frontAnswerer/lib/utils/themes/generic.ts

148 lines
3.6 KiB
TypeScript
Raw Normal View History

2024-05-02 08:20:01 +00:00
import {createTheme} from "@mui/material";
import {fontFaces} from "./fontFace";
2023-12-16 14:55:56 +00:00
declare module '@mui/material/Button' {
interface ButtonPropsVariantOverrides {
main: true;
outmain: true;
}
}
const theme = createTheme({
breakpoints: {
values: {
xs: 0,
sm: 560,
md: 900,
lg: 1200,
xl: 1536,
},
},
components: {
2024-05-01 10:12:31 +00:00
MuiCssBaseline: {
styleOverrides: fontFaces,
},
MuiScopedCssBaseline: {
styleOverrides: {
root: fontFaces,
}
},
2023-12-16 14:55:56 +00:00
MuiTypography: {
defaultProps: {
variantMapping: {
p1: "p",
}
},
},
MuiButton: {
variants: [
{
props: {
2024-05-01 10:12:31 +00:00
variant: 'contained'
},
2023-12-16 14:55:56 +00:00
style: {
backgroundColor: "#7E2AEA",
padding: '13px 20px',
borderRadius: '8px',
color: '#ffffff',
boxShadow: "none",
"&:hover": {
backgroundColor: "#581CA7"
}
},
},
{
props: {
2024-05-01 10:12:31 +00:00
variant: 'outlined'
},
2023-12-16 14:55:56 +00:00
style: {
backgroundColor: "#F2F3F7",
padding: '10px 20px',
borderRadius: '8px',
border: '1px solid #7E2AEA',
color: '#9A9AAF',
"&:hover": {
backgroundColor: "#581CA7",
border: '1px solid #581CA7',
}
},
},
],
},
},
typography: {
h5: { // H2 в макете
fontSize: "24px",
lineHeight: "28.44px",
2024-03-26 00:06:54 +00:00
fontWeight: 501,
2023-12-16 14:55:56 +00:00
},
button: {
fontSize: "18px",
lineHeight: "24px",
fontWeight: 400,
textTransform: "none",
},
body1: { // T1 в макете
fontSize: "18px",
lineHeight: "21.33px",
fontWeight: 400,
},
body2: { // M1 в макете
fontSize: "16px",
lineHeight: "20px",
fontWeight: 500,
},
p1: { // P1 в макете
fontSize: "20px",
lineHeight: "24px",
fontWeight: 500,
},
fontFamily: [
2024-05-01 10:12:31 +00:00
'"Lato"',
2024-05-02 08:20:01 +00:00
"Twemoji Country Flags",
2023-12-16 14:55:56 +00:00
"-apple-system",
"BlinkMacSystemFont",
"Arial",
"sans-serif",
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(","),
},
});
theme.typography.h2 = {
fontSize: "70px",
lineHeight: "70px",
fontWeight: 500,
[theme.breakpoints.down("md")]: {
fontSize: "42px",
lineHeight: "50px",
}
};
theme.typography.h4 = { // H1 в макете
fontSize: "36px",
lineHeight: "42.66px",
fontWeight: 500,
[theme.breakpoints.down("md")]: {
fontSize: "24px",
lineHeight: "28.44px",
}
};
theme.typography.infographic = {
fontSize: "80px",
lineHeight: "94.8px",
fontWeight: 400,
[theme.breakpoints.down("md")]: {
fontSize: "50px",
lineHeight: "59px",
fontWeight: 400,
}
};
2024-02-15 09:01:52 +00:00
export default theme;