add subtitle typography variant

This commit is contained in:
Abhinav 2022-06-04 16:37:09 +05:30
parent 617d51dcaa
commit 5ee5b5f890
2 changed files with 11 additions and 13 deletions

View file

@ -14,12 +14,7 @@ export default function AllCollectionsHeader({
return ( return (
<DialogTitle> <DialogTitle>
<SpaceBetweenFlex> <SpaceBetweenFlex>
<Typography <Typography variant="subtitle">
css={`
font-size: 24px;
font-weight: 600;
line-height: 36px;
`}>
{constants.ALL_ALBUMS} {constants.ALL_ALBUMS}
</Typography> </Typography>
<IconButton onClick={onClose}> <IconButton onClick={onClose}>
@ -27,13 +22,7 @@ export default function AllCollectionsHeader({
</IconButton> </IconButton>
</SpaceBetweenFlex> </SpaceBetweenFlex>
<SpaceBetweenFlex> <SpaceBetweenFlex>
<Typography <Typography variant="subtitle" color={'text.secondary'}>
css={`
font-size: 24px;
font-weight: 600;
line-height: 36px;
`}
color={'text.secondary'}>
{`${collectionCount} ${constants.ALBUMS}`} {`${collectionCount} ${constants.ALBUMS}`}
</Typography> </Typography>
<CollectionSort <CollectionSort

View file

@ -16,10 +16,12 @@ declare module '@mui/material/styles' {
interface TypographyVariants { interface TypographyVariants {
title: React.CSSProperties; title: React.CSSProperties;
subtitle: React.CSSProperties;
} }
interface TypographyVariantsOptions { interface TypographyVariantsOptions {
title?: React.CSSProperties; title?: React.CSSProperties;
subtitle?: React.CSSProperties;
} }
} }
@ -38,6 +40,7 @@ declare module '@mui/material/Checkbox' {
declare module '@mui/material/Typography' { declare module '@mui/material/Typography' {
interface TypographyPropsVariantOverrides { interface TypographyPropsVariantOverrides {
title: true; title: true;
subtitle: true;
} }
} }
@ -170,6 +173,12 @@ const darkThemeOptions = createTheme({
fontWeight: 600, fontWeight: 600,
display: 'block', display: 'block',
}, },
subtitle: {
fontSize: '24px',
fontWeight: 600,
lineHeight: '36px',
display: 'block',
},
fontFamily: ['Inter', 'sans-serif'].join(','), fontFamily: ['Inter', 'sans-serif'].join(','),
}, },
}); });