GeekyAnts / GeekyAnts/NativeBase

Toast variants are ignored

Open
#5,749 0 comments 0 reactions 0 assignees View on GitHub
bug triage v3
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.