Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[website] Migrate Product-Templates page to use CSS theme variables #34913

Merged
merged 11 commits into from
Oct 31, 2022
Merged
Prev Previous commit
Next Next commit
[docs][website] Update More to use CSS theme variables
  • Loading branch information
EduardoSCosta committed Oct 28, 2022
commit ae88cd72c5a4b58b044856aa4c3ce1619544e94b
47 changes: 28 additions & 19 deletions docs/src/components/action/More.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,36 @@ export default (function More(props: ButtonBaseProps) {
props.onFocusVisible(event);
}
}}
sx={{
p: 2,
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-start',
cursor: 'pointer',
borderRadius: 1,
height: '100%',
border: '2px dashed',
transitionProperty: 'all',
transitionDuration: '150ms',
borderColor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.500' : 'grey.200'),
'&:hover, &:focus': {
borderColor: 'primary.main',
bgcolor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.700' : 'primary.50'),
'@media (hover: none)': {
bgcolor: 'transparent',
sx={[
{
p: 2,
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-start',
cursor: 'pointer',
borderRadius: 1,
height: '100%',
border: '2px dashed',
transitionProperty: 'all',
transitionDuration: '150ms',
borderColor: 'grey.200',
'&:hover, &:focus': {
borderColor: 'primary.main',
bgcolor: 'primary.50',
'@media (hover: none)': {
bgcolor: 'transparent',
},
},
},
...props.sx,
}}
(theme) =>
theme.applyDarkStyles({
borderColor: 'primaryDark.500',
'&:hover, &:focus': {
bgcolor: 'primaryDark.700',
},
}),
...(Array.isArray(props.sx) ? props.sx : [props.sx]),
]}
>
<Box component="span" sx={{ mr: 1, px: '3px', lineHeight: 0 }}>
<AddCircleOutlineRounded color="primary" fontSize="small" />
Expand Down