Skip to content

Instantly share code, notes, and snippets.

@Brlaney
Last active September 23, 2022 09:46
Show Gist options
  • Save Brlaney/6fa2c386f8e0dafd661c2bd91637bc73 to your computer and use it in GitHub Desktop.
Save Brlaney/6fa2c386f8e0dafd661c2bd91637bc73 to your computer and use it in GitHub Desktop.
My custom Material-UI theme
import {
createTheme,
responsiveFontSizes
} from '@mui/material/styles';
const font = "'Rubik', sans-serif";
let theme = createTheme({
palette: {
primary: { main: '#1d2031' },
secondary: { main: '#dc0250' },
error: { main: '#6E353A' },
warning: { main: '#F5EE9E' },
info: { main: '#568BFF' },
success: { main: '#00B389' },
background: { default: '#FDFFFC' }
},
breakpoints: {
values: { xs: 600, sm: 800, md: 1000, lg: 1200, xl: 1536, }
},
typography: {
fontFamily: font,
h1: { fontSize: 69 },
h2: { fontSize: 57 },
h3: { fontSize: 48 },
h4: { fontSize: 40 },
h5: { fontSize: 33 },
h6: { fontSize: 28 },
subtitle1: { fontSize: 23 },
subtitle2: { fontSize: 19 },
body1: { fontSize: 19 },
body2: { fontSize: 16 }
}
});
theme = responsiveFontSizes(theme);
export default theme;
@Brlaney
Copy link
Author

Brlaney commented Sep 28, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment