Skip to content

How to theme Button _disabled color? #1621

Discussion options

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";
import React from "react";

const customTheme = mergeTheme(defaultTheme, {
  components: {
    Button: {
      baseStyle: {
        selectors: {
          _disabled: {
            backgroundColor: "blue"
          }
        }
      }
    }
  }
});

const App: React.FC = () => {
  return (
    <ThemeProvider value={customTheme}>
        <Button disabled={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

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

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