GeekyAnts / GeekyAnts/NativeBase
defaultProps as function ignores variant
Open
bug
triage
v3
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
defaultProps as function ignores variant
### CodeSandbox/Snack link
Not relevant - app only
### Steps to reproduce
When customizing the theme, add:
```ts
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_
Contributor guide
Assessment
This issue has not been assessed yet.