Skip to content

Commit

Permalink
fix(odyssey-react-mui): fix Button :focus-visible styles
Browse files Browse the repository at this point in the history
  • Loading branch information
edburyenegren-okta committed Aug 10, 2022
1 parent be7a3b6 commit 91aaa06
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions packages/odyssey-react-mui/src/themes/odyssey/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export const components: ThemeOptions["components"] = {
backgroundColor: theme.palette.primary.dark,
},

"&:focus-visible": {
outlineColor: theme.palette.primary.main,
},

"&:active": {
backgroundColor: theme.palette.primary.main,
},
Expand All @@ -140,15 +144,14 @@ export const components: ThemeOptions["components"] = {
backgroundColor: theme.palette.grey[50],
borderColor: theme.palette.grey[200],
color: theme.palette.text.primary,
"&:hover": {
background: theme.palette.primary.lighter,
"&:hover, &:focus-visible": {
backgroundColor: theme.palette.primary.lighter,
borderColor: theme.palette.primary.light,
color: theme.palette.primary.main,
},

"&:focus-visible": {
backgroundColor: theme.palette.primary.main,
color: theme.palette.primary.main,
outlineColor: theme.palette.primary.main,
},

"&:active": {
Expand All @@ -174,7 +177,7 @@ export const components: ThemeOptions["components"] = {
},

"&:focus-visible": {
outlineColor: theme.palette.error.light,
outlineColor: theme.palette.error.main,
backgroundColor: theme.palette.error.dark,
},

Expand All @@ -199,6 +202,9 @@ export const components: ThemeOptions["components"] = {
backgroundColor: "rgba(29, 29, 33, 0.1)",
borderColor: "transparent",
},
"&:focus-visible": {
outlineColor: theme.palette.primary.main,
},
"&:active": {
backgroundColor: "rgba(29, 29, 33, 0.2)",
borderColor: "transparent",
Expand Down

0 comments on commit 91aaa06

Please sign in to comment.