fix: buttons :active/:focus styles (#173)

* chore: update Button component styles

* chore: update textStyles

* chore: remove redundant styles
This commit is contained in:
Nicolás Quiroz 2022-12-15 19:37:21 -03:00 committed by GitHub
parent 8b0d037f6a
commit a688f81afe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 18 deletions

View file

@ -83,13 +83,15 @@ export const DownloadsHero: FC<DownloadsHero> = ({
return (
<NextLink key={key} href={buildURL} passHref legacyBehavior>
<Button as='a' variant='downloadsHeader' width={{ base: '100%' }} h={16} data-group>
<Button as='a' variant='primary' width={{ base: '100%' }} h={16} data-group>
<HStack spacing={4}>
<Stack alignItems='center'>
<Svg
aria-label={ariaLabel}
maxH='44px'
_groupHover={{ color: 'yellow.50' }}
_groupFocus={{ color: 'yellow.50' }}
_groupActive={{ color: 'yellow.50' }}
/>
</Stack>
<Box>

View file

@ -13,23 +13,10 @@ export const Button = {
},
_active: {
bg: 'secondary',
borderTop: '4px',
borderTop: '4px solid',
borderColor: 'primary',
pt: '4px'
}
},
downloadsHeader: {
py: '8px',
px: '32px',
borderRadius: 0,
width: { base: '188px', md: 'auto' },
bg: 'primary',
_hover: { bg: 'secondary' },
_focus: {
bg: 'primary',
boxShadow: 'inset 0 0 0 2px var(--chakra-colors-green-200) !important'
},
_active: { borderTop: '4px solid', borderColor: 'green.200' }
}
}
};

View file

@ -63,7 +63,9 @@ export const textStyles = {
color: 'bg',
fontWeight: 700,
textTransform: 'uppercase',
_groupHover: { color: 'yellow.50' }
_groupHover: { color: 'yellow.50' },
_groupFocus: { color: 'yellow.50' },
_groupActive: { color: 'yellow.50' }
},
'home-section-link-label': {
fontFamily: 'heading',
@ -111,14 +113,18 @@ export const textStyles = {
color: 'bg',
fontSize: { base: 'md', lg: 'xl' },
textTransform: 'uppercase',
_groupHover: { color: 'yellow.50' }
_groupHover: { color: 'yellow.50' },
_groupFocus: { color: 'yellow.50' },
_groupActive: { color: 'yellow.50' }
},
'downloads-button-sublabel': {
fontFamily: 'heading',
color: 'bg',
fontSize: { base: 'xs', lg: 'sm' },
textTransform: 'uppercase',
_groupHover: { color: 'yellow.50' }
_groupHover: { color: 'yellow.50' },
_groupFocus: { color: 'yellow.50' },
_groupActive: { color: 'yellow.50' }
},
'download-tab-label': {
fontFamily: 'heading',