Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to theme Button _disabled color?#1621

Discussion options

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

You must be logged in to vote

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

Comment options

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

You must be logged in to vote
1 reply
@vadimcoder
Comment options

Hello@brandongregoryscott! Thanks, it works! It was my fault, indeed. A misconfiguration on my side, sorry.

Answer selected byvadimcoder
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
themingQuestion, feedback, etc. around theming architecture
2 participants
@vadimcoder@brandongregoryscott

[8]ページ先頭

©2009-2025 Movatter.jp