Skip to content

Set black focus is a real challenge #1608

Discussion options

You must be logged in to vote

Hey Kevin,

You should be able to override the borderColor and boxShadow for the Button with a custom theme. The focus, hover, etc. styles need to be overridden using the mapped selector name (i.e. _focus - the internal logic of the component resolves this to the more complex selector)

_focus: '&:not([disabled]):focus',

Digging into this, I realized the types for the theme in v7 are a little out of date now that the selectors prop is used, but the same idea applies - just nested under a selectors key.

In V7:

const theme = mergeTheme(defaultTheme, {
  components: {
    Button: {
      baseStyle: {
        selectors: {

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kevincharles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theming Question, feedback, etc. around theming architecture
2 participants