@material-ui/core#responsiveFontSizes TypeScript Examples
The following examples show how to use
@material-ui/core#responsiveFontSizes.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: theme.ts From interface-v2 with GNU General Public License v3.0 | 4 votes |
mainTheme = responsiveFontSizes(
createQuickTheme({
palette: {
action: {
disabledBackground: '',
disabled: 'set color of text here',
},
primary: {
main: primary,
dark: primaryDark,
},
grey: {
A100: greyLight,
A400: greyBgLight,
A700: greyBg,
},
secondary: {
main: secondary,
light: secondaryLight,
dark: secondaryDark,
contrastText: secondaryContrast,
},
common: {
black,
white,
},
text: {
primary: textPrimary,
secondary: textSecondary,
disabled: textDisabled,
hint: textHint,
},
background: {
default: bgColor,
paper: bgPalette,
},
success: {
main: successMain,
dark: successDark,
light: successLight,
},
error: {
main: errorMain,
dark: errorDark,
light: errorLight,
},
divider: divider,
},
typography: {
htmlFontSize: 16,
fontFamily: "'Inter', sans-serif",
fontSize: 14,
h1: {
fontSize: 60,
fontWeight: 'bold',
lineHeight: 0.93,
},
h2: {
fontSize: 40,
fontWeight: 'bold',
lineHeight: 1.2,
},
h3: {
fontSize: 30,
fontWeight: 'bold',
lineHeight: 1.33,
},
h4: {
fontSize: 24,
fontWeight: 'bold',
lineHeight: 1.5,
},
h5: {
fontSize: 20,
fontWeight: 'bold',
lineHeight: 1.5,
},
h6: {
fontSize: 16,
fontWeight: 600,
lineHeight: 1.5,
},
subtitle1: {
fontSize: 20,
lineHeight: 1.5,
},
subtitle2: {
fontSize: 18,
lineHeight: 1.56,
},
body1: {
fontSize: 16,
fontWeight: 500,
lineHeight: 1.5,
},
body2: {
fontSize: 14,
fontWeight: 500,
lineHeight: 1.57,
},
caption: {
fontSize: 12,
fontWeight: 600,
lineHeight: 1.33,
},
overLine: {
fontSize: 13,
fontWeight: 'bold',
lineHeight: 1.69,
},
},
spacing,
breakpoints: {
values: {
xl,
lg,
md,
sm,
xs,
},
},
overrides: {
MuiButton: {
root: {
fontSize: 14,
fontWeight: 'bold',
lineHeight: '20px',
textTransform: 'none',
backgroundColor: primary,
color: white,
boxShadow: 'none',
'&:hover': {
backgroundColor: primary,
opacity: 0.8,
},
'&$disabled': {
opacity: 0.3,
},
},
secondary: {
background: secondary,
},
textPrimary: {
background: `linear-gradient(to bottom, ${primary}, #004ce6)`,
borderRadius: 50,
color: white,
},
},
MuiContainer: {
root: {
paddingLeft: '40px !important',
paddingRight: '40px !important',
},
},
},
}),
)