mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
fix: add focus style to vertical tabs (#4186)
https://linear.app/unleash/issue/2-1206/we-need-focus-state-for-vertical-menu Adds a `focus-visible` style to vertical tabs in order to improve keyboard navigation. ![image](https://github.com/Unleash/unleash/assets/14320932/e07a1b69-2134-4d76-bafe-1c87a0384e64)
This commit is contained in:
parent
6638a2f47d
commit
82d855ea1f
@ -30,7 +30,14 @@ const StyledTab = styled(Button)<{ selected: boolean }>(
|
|||||||
'&.Mui-disabled': {
|
'&.Mui-disabled': {
|
||||||
pointerEvents: 'auto',
|
pointerEvents: 'auto',
|
||||||
},
|
},
|
||||||
|
'&:focus-visible': {
|
||||||
|
outline: `2px solid ${theme.palette.primary.main}`,
|
||||||
|
},
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
'& > span': {
|
||||||
|
borderTopLeftRadius: 0,
|
||||||
|
borderBottomLeftRadius: 0,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -48,10 +55,8 @@ export const VerticalTab = ({
|
|||||||
<StyledTab
|
<StyledTab
|
||||||
selected={Boolean(selected)}
|
selected={Boolean(selected)}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
disableRipple
|
|
||||||
disableElevation
|
disableElevation
|
||||||
disableFocusRipple
|
disableFocusRipple
|
||||||
disableTouchRipple
|
|
||||||
fullWidth
|
fullWidth
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
|
Loading…
Reference in New Issue
Block a user