NativeBase
NativeBase copied to clipboard
defaultProps as function ignores variant
Description
defaultProps as function ignores variant
CodeSandbox/Snack link
Not relevant - app only
Steps to reproduce
When customizing the theme, add:
extendTheme({
components: {
Text: {
defaultProps: () => ({ variant: 'body' }),
variants: {
body: { ... },
}
},
},
})
Result: The variant value is not applied.
If defining defaultProps as an object, it is applied.
NativeBase Version
3.4.28
Platform
- [X] Android
- [ ] CRA
- [X] Expo
- [X] iOS
- [ ] Next
Other Platform
No response
Additional Information
No response