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

Base style extendTheme for Button component does not work #5797

Open
2 of 5 tasks
vladcristianmarin opened this issue Dec 10, 2023 · 0 comments
Open
2 of 5 tasks

Base style extendTheme for Button component does not work #5797

vladcristianmarin opened this issue Dec 10, 2023 · 0 comments

Comments

@vladcristianmarin
Copy link

vladcristianmarin commented Dec 10, 2023

Description

I want to configure the default shade for colorScheme primary to be a lighter shade of the primary color scheme

Steps to reproduce

Create a themeConfig using extendTheme function, override the Button component baseStyle bg property

Expected behaviour: The button bg color to change from the default primary color to a lighter shade
Actual behaviour: The button bg color does not change

This is my code snippet

const themeConfig = extendTheme({
  colors: {
    ...generateShades(overriddenColors.primary, 'primary'),
    ...generateShades(overriddenColors.secondary, 'secondary'),
    ...generateShades(overriddenColors.tertiary, 'tertiary'),
  },
  config: {
    initialColorMode: 'light',
  },
  components: {
    Button: {
      baseStyle: ({ colorScheme }) => {
        return { bg: `${colorScheme}.200` };
      },
    },
  },
});

NativeBase Version

3.3.1

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