1- import { createTheme } from '@mui/material/styles'
1+ import { createTheme , responsiveFontSizes } from '@mui/material/styles'
22
33import {
44 ALMOST_BLACK ,
@@ -20,10 +20,35 @@ declare module '@mui/material/Button' {
2020 }
2121}
2222
23- const theme = createTheme ( {
23+ declare module '@mui/material/styles' {
24+ interface TypographyVariants {
25+ bannerTitle : React . CSSProperties
26+ bannerSubtitle : React . CSSProperties
27+ }
28+
29+ interface TypographyVariantsOptions {
30+ bannerTitle ?: React . CSSProperties
31+ bannerSubtitle ?: React . CSSProperties
32+ }
33+
34+ interface TypeText {
35+ inverted : string
36+ }
37+ }
38+
39+ declare module '@mui/material/Typography' {
40+ interface TypographyPropsVariantOverrides {
41+ bannerTitle : true
42+ bannerSubtitle : true
43+ }
44+ }
45+
46+ const baseTheme = createTheme ( {
47+ spacing : 4 ,
2448 typography : {
25- fontFamily : 'Rubik, sans-serif' ,
26- fontSize : 12 ,
49+ fontFamily : `'Rubik Variable', sans-serif` ,
50+ fontWeightBold : 500 ,
51+ fontSize : 16 ,
2752 body1 : {
2853 fontSize : '1rem' ,
2954 } ,
@@ -38,7 +63,6 @@ const theme = createTheme({
3863 } ,
3964 button : {
4065 fontSize : '1rem' ,
41- fontWeight : 700 ,
4266 textTransform : 'none' ,
4367 } ,
4468 caption : {
@@ -52,11 +76,21 @@ const theme = createTheme({
5276 fontSize : '1.5rem' ,
5377 fontWeight : 600 ,
5478 } ,
79+ bannerTitle : {
80+ fontSize : '6rem' ,
81+ lineHeight : 1 ,
82+ } ,
83+ bannerSubtitle : {
84+ fontSize : '1.5rem' ,
85+ fontWeight : 500 ,
86+ lineHeight : 1.25 ,
87+ } ,
5588 } ,
5689 palette : {
5790 text : {
5891 primary : ALMOST_BLACK ,
5992 secondary : DARK_GREY ,
93+ inverted : WHITE ,
6094 } ,
6195 primary : {
6296 main : COMAPEO_BLUE ,
@@ -95,7 +129,7 @@ const theme = createTheme({
95129 variant : 'contained' ,
96130 } ,
97131 styleOverrides : {
98- root : ( { ownerState } ) => ( {
132+ root : ( { ownerState, theme } ) => ( {
99133 ...( ownerState . variant === 'outlined' && {
100134 borderColor : '#CCCCD6' ,
101135 borderWidth : 1 ,
@@ -106,16 +140,30 @@ const theme = createTheme({
106140 borderWidth : 1 ,
107141 } ,
108142 } ) ,
109- borderRadius : 32 ,
110- textTransform : 'none' ,
111- fontSize : '1rem' ,
112- fontWeight : 400 ,
113- paddingVertical : 12 ,
143+ borderRadius : theme . spacing ( 8 ) ,
114144 } ) ,
115145 } ,
116146 } ,
117147 } ,
118- spacing : 1 ,
148+ } )
149+
150+ const theme = responsiveFontSizes ( baseTheme , {
151+ breakpoints : [ 'xs' , 'sm' , 'md' , 'lg' , 'xl' ] ,
152+ variants : [
153+ 'bannerSubtitle' ,
154+ 'bannerTitle' ,
155+ 'body1' ,
156+ 'body2' ,
157+ 'button' ,
158+ 'caption' ,
159+ 'h1' ,
160+ 'h2' ,
161+ 'h3' ,
162+ 'h4' ,
163+ 'h5' ,
164+ 'subtitle1' ,
165+ 'subtitle2' ,
166+ ] ,
119167} )
120168
121169export { theme }
0 commit comments