- Notifications
You must be signed in to change notification settings - Fork814
How to theme Button _disabled color?#1621
-
Hi, community! Could someone please explain me how to change the colors of Button _disabled? This doesn't work: Button:{baseStyle:{selectors:{_disabled:{backgroundColor:"blue",},}}} Also I tried thisthis Marked as Answer answer, and it doesn't help either: defaultTheme.components.Button.appearances.default={ ...defaultTheme.components.Button.appearances.default,_disabled:{backgroundColor:"blue",},} Evergreen-ui 7.1.4 |
BetaWas this translation helpful?Give feedback.
All reactions
Can you provide a CodeSandbox for reproduction? I think you might be missing something in your setup.
import{ThemeProvider,mergeTheme,defaultTheme,Button}from"evergreen-ui";importReactfrom"react";constcustomTheme=mergeTheme(defaultTheme,{components:{Button:{baseStyle:{selectors:{_disabled:{backgroundColor:"blue"}}}}}});constApp:React.FC=()=>{return(<ThemeProvidervalue={customTheme}><Buttondisabled={true}>Confirm</Button></ThemeProvider>);};
https://codesandbox.io/s/discussion-1621-button-disabled-styling-cow45v?file=/src/App.tsx
Replies: 1 comment 1 reply
-
Can you provide a CodeSandbox for reproduction? I think you might be missing something in your setup. import{ThemeProvider,mergeTheme,defaultTheme,Button}from"evergreen-ui";importReactfrom"react";constcustomTheme=mergeTheme(defaultTheme,{components:{Button:{baseStyle:{selectors:{_disabled:{backgroundColor:"blue"}}}}}});constApp:React.FC=()=>{return(<ThemeProvidervalue={customTheme}><Buttondisabled={true}>Confirm</Button></ThemeProvider>);}; https://codesandbox.io/s/discussion-1621-button-disabled-styling-cow45v?file=/src/App.tsx |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hello@brandongregoryscott! Thanks, it works! It was my fault, indeed. A misconfiguration on my side, sorry. |
BetaWas this translation helpful?Give feedback.