GeekyAnts / GeekyAnts/NativeBase

Base style extendTheme for Button component does not work

Open
#5,797 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

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

- [X] Android
- [ ] CRA
- [ ] Expo
- [X] iOS
- [ ] Next

### Other Platform

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.