GeekyAnts / GeekyAnts/NativeBase
Toast variants are ignored
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When defining Toast variants within the Theme they are ignored when passed to the toast.show() method as they are not resolved by the Toast component, instead the props are passed to a generic VStack. The only solution is to use the render prop to pass a custom element.
### CodeSandbox/Snack link
N/A
### Steps to reproduce
_No response_
### NativeBase Version
3.4.26
### Platform
- [X] Android
- [ ] CRA
- [ ] Expo
- [X] iOS
- [ ] Next
### Other Platform
Storybook
### Additional Information
_No response_
Contributor guide
Research direction
Start by tracing the Toast component and the toast.show() entry point, focusing on how Theme variants are resolved before props reach the generic VStack. Reproduce the behavior on Android or iOS, then verify that Toast variants are applied without requiring the render prop; Storybook can provide an additional check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100