Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultProps as function ignores variant #5763

Open
3 of 5 tasks
WouterFlorijn opened this issue Jul 4, 2023 · 0 comments
Open
3 of 5 tasks

defaultProps as function ignores variant #5763

WouterFlorijn opened this issue Jul 4, 2023 · 0 comments

Comments

@WouterFlorijn
Copy link

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

  • Android
  • CRA
  • Expo
  • iOS
  • Next

Other Platform

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant