💄(frontend) style hovered or selected Tab
Introduce a new variant, by default disabled, that visually style a hovered or selected Tab.
This commit is contained in:
committed by
aleb_the_flash
parent
69a8eea1ce
commit
e3b7a1f77b
@@ -40,7 +40,6 @@ const StyledTab = styled(RACTab, {
|
|||||||
outline: 'none',
|
outline: 'none',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
color: 'box.text',
|
color: 'box.text',
|
||||||
transition: 'color 200ms ease, backgroundColor 200ms ease',
|
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
forcedColorAdjust: 'none',
|
forcedColorAdjust: 'none',
|
||||||
},
|
},
|
||||||
@@ -57,6 +56,25 @@ const StyledTab = styled(RACTab, {
|
|||||||
border: 'none',
|
border: 'none',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
highlight: {
|
||||||
|
true: {
|
||||||
|
borderRadius: 4,
|
||||||
|
backgroundColor: 'colorPalette.active',
|
||||||
|
transition: 'background 200ms, color 200ms',
|
||||||
|
'&[data-hovered]': {
|
||||||
|
backgroundColor: 'gray.100',
|
||||||
|
color: 'box.text',
|
||||||
|
},
|
||||||
|
'&[data-selected]': {
|
||||||
|
backgroundColor: 'primary',
|
||||||
|
color: 'white',
|
||||||
|
'&[data-hovered]': {
|
||||||
|
backgroundColor: 'primary',
|
||||||
|
color: 'white',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
border: true,
|
border: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user