I am using chakra ui.
I want to change the Button Color to #2477b3.
I can change it by passing the value in the props, but it takes a lot of time and effort to pass the value in the props every time, so I want to change the default Button color, etc.
I want to use the style of the A button.
I changed the theme.ts and created a BButton, but the style did not change.
I tried changing the value in theme.ts, but the color did not change.
<Button
size={'sm'}
bg="#2B6CB0"
_hover={{ bg: '#2477b3' }}
_active={{
bg: '#2477b3',
transform: 'scale(0.98)',
borderColor: '#2477b3',
}}
color={'#ffffff'}
>
AButton
</Button>
<Button>BButton</Button>
theme.ts
import { extendTheme } from '@chakra-ui/react';
export const theme = extendTheme({
components: {
Button: {
baseStyle: {
fontWeight: 'bold',
_hover: {
_disabled: {
bg: '#2477b3',
},
},
},
variants: {
bg: '#2B6CB0',
_active: {
bg: '#2477b3',
transform: 'scale(0.98)',
borderColor: '#2477b3',
},
},
},
},
});