123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- import {
- // for strict mode
- unstable_createMuiStrictModeTheme as createMuiTheme,
- } from '@material-ui/core/styles';
- declare module '@material-ui/core/styles/createPalette' {
- interface Palette {
- milvusBlue: Palette['primary'];
- milvusGrey: Palette['primary'];
- }
- interface PaletteOptions {
- milvusBlue: PaletteOptions['primary'];
- milvusGrey: PaletteOptions['primary'];
- }
- }
- const commonThemes = {
- typography: {
- fontFamily: [
- 'Roboto',
- '-apple-system',
- 'BlinkMacSystemFont',
- '"Segoe UI"',
- '"Helvetica Neue"',
- 'Arial',
- 'sans-serif',
- '"Apple Color Emoji"',
- '"Segoe UI Emoji"',
- '"Segoe UI Symbol"',
- ].join(','),
- },
- palette: {
- primary: {
- main: '#06aff2',
- light: '#bfdeff',
- dark: '#0689D2',
- },
- secondary: {
- light: '#82d3ba',
- main: '#31b78d',
- dark: '#279371',
- },
- error: {
- main: '#ff4605',
- light: '#ff8f68',
- dark: '#cd3804',
- },
- milvusBlue: {
- main: '#f8f8fc',
- dark: '#dcdce3',
- },
- milvusGrey: {
- main: '#aeaebb',
- light: '#dcdce3',
- dark: '#82838e',
- contrastText: '#f8f8fc',
- },
- },
- breakpoints: {
- values: {
- xs: 0,
- sm: 600,
- md: 1025,
- lg: 1200,
- xl: 1920,
- },
- },
- spacing: (factor: number) => `${8 * factor}px`,
- };
- export const theme = createMuiTheme({
- ...commonThemes,
- overrides: {
- MuiTypography: {
- button: {
- textTransform: 'initial',
- lineHeight: '16px',
- fontWeight: 'bold',
- },
- h1: {
- fontSize: '36px',
- lineHeight: '42px',
- fontWeight: 'bold',
- letterSpacing: '-0.02em',
- },
- h2: {
- lineHeight: '24px',
- fontSize: '28px',
- fontWeight: 'bold',
- },
- h3: {
- lineHeight: '20px',
- fontSize: '24px',
- fontWeight: 'bold',
- },
- h4: {
- fontWeight: 500,
- lineHeight: '23px',
- fontSize: '20px',
- letterSpacing: '-0.02em',
- },
- h5: {
- fontWeight: 'bold',
- fontSize: '16px',
- lineHeight: '24px',
- },
- h6: {
- fontWeight: 'normal',
- fontSize: '16px',
- lineHeight: '24px',
- letterSpacing: '-0.01em',
- },
- // style for element p
- body1: {
- fontSize: '14px',
- lineHeight: '20px',
- },
- // small caption
- body2: {
- fontSize: '12px',
- lineHeight: '16px',
- },
- // tiny caption
- caption: {
- fontSize: '10px',
- lineHeight: '12px',
- },
- },
- MuiButton: {
- root: {
- textTransform: 'initial',
- fontWeight: 'bold',
- },
- text: {
- '&:hover': {
- backgroundColor: commonThemes.palette.primary.light,
- },
- },
- },
- MuiDialogActions: {
- spacing: {
- padding: commonThemes.spacing(4),
- },
- },
- MuiDialogContent: {
- root: {
- padding: `${commonThemes.spacing(1)} ${commonThemes.spacing(4)}`,
- },
- },
- MuiDialogTitle: {
- root: {
- padding: commonThemes.spacing(4),
- paddingBottom: commonThemes.spacing(1),
- },
- },
- MuiFormHelperText: {
- contained: {
- marginLeft: 0,
- },
- },
- },
- });
|