Skip to content

Commit

Permalink
focus-visible update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejoYarce committed Oct 24, 2024
1 parent e71ece1 commit 7d7b653
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
],
"scripts": {
"dev": "react-scripts start",
"start": "yarn storybook",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
Expand Down
8 changes: 4 additions & 4 deletions src/components/Button/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const PrimaryButton = styled(BaseButton)`
box-shadow: 0px 4px 6px -1px #0000001A;
}
&:focus {
&:focus-visible {
outline-color: ${getThemedColor(theme.colors, 'primary', 700)};
background-color: ${getThemedColor(theme.colors, 'primary', 500)};
border: 2px solid ${getThemedColor(theme.colors, 'primary', 500)};
Expand Down Expand Up @@ -90,7 +90,7 @@ export const SecondaryButton = styled(BaseButton)`
box-shadow: 0px 4px 6px -1px #0000001A;
}
&:focus {
&:focus-visible {
outline-color: ${getThemedColor(theme.colors, 'primary', 700)};
}
`
Expand Down Expand Up @@ -131,7 +131,7 @@ export const BorderlessButton = styled(BaseButton)`
box-shadow: 0px 4px 6px -1px #0000001A;
}
&:focus {
&:focus-visible {
outline-color: ${getThemedColor(theme.colors, 'primary', 700)};
}
`
Expand Down Expand Up @@ -169,7 +169,7 @@ export const OutlineButton = styled(BaseButton)`
border: 1px solid ${getThemedColor(theme.colors, 'primary', 900)} !important;
}
&:focus {
&:focus-visible {
outline-color: ${getThemedColor(theme.colors, 'primary', 700)};
background-color: ${getThemedColor(theme.colors, 'primary', 100)};
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavigationRail/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type NavigationRailTabProps = {
} & ButtonProps

export type NavigationRailProps = {
tabs?: NavigationRailTabProps[]
tabs: NavigationRailTabProps[]
isOnLeft?: boolean
defaultActiveTabId?: string
onTabClick?: (tabId: string) => void
Expand Down
3 changes: 1 addition & 2 deletions src/components/Radio/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ export const StyledRadio = styled(Radio)<{
${({ theme }) => getThemedColor(theme.colors, 'primary', 500)}40;
}
&:focus,
&:focus-visible,
&[data-focus] {
&[data-focus-visible] {
outline: 2px solid
${({ theme }) => getThemedColor(theme.colors, 'primary', 700)};
outline-offset: 2px;
Expand Down
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as Switch } from './Switch'
export { default as Button } from './Button'
export { default as NavigationRail } from './NavigationRail'
export { default as RadioGroup } from './Radio/RadioGroup'

0 comments on commit 7d7b653

Please sign in to comment.