-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrootTheme.js
More file actions
176 lines (154 loc) · 3.57 KB
/
Copy pathrootTheme.js
File metadata and controls
176 lines (154 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import {createTheme} from "@mui/material";
/*
SPECIFY DISCORD COLORS
*/
let theme = createTheme({
discordPalette: {
brand: '#5865f2',
lighterBrand: '#7983f5', // used in button
black: '#000000',
gray: '#23272a',
lighterGray: '#36393f', // used in button
white: '#ffffff',
offWhite: '#f6f6f6',
red: '#de2761',
green: '#43b581'
}
})
theme = createTheme(theme, {
shape: {
borderRadius: 28
},
palette: {
type: 'light',
primary: {
main: theme.discordPalette.brand,
},
secondary: {
main: theme.discordPalette.gray,
},
background: {
default: theme.discordPalette.offWhite,
},
error: {
main: theme.discordPalette.red,
},
success: {
main: theme.discordPalette.green,
},
text: {
primary: theme.discordPalette.gray,
secondary: '#ffffff',
},
divider: theme.discordPalette.brand,
},
});
/*
SPECIFY DISCORD FONTS
*/
// for use in importing fonts without fonts.scss
// const WhitneyBook = "/fonts/WhitneyBookRegular.woff";
// const WhitneyMedium = "/fonts/WhitneyMediumRegular.woff";
// const WhitneySemibold = "/fonts/WhitneySemiboldRegular.woff";
// const GintoNormal = "/fonts/GintoNormal.woff2";
// const GintoNord = "/fonts/GintoNord.woff2";
// const ArchivoBlack = "/fonts/ArchivoBlack.ttf";
// const ReenieBeanie = "/fonts/ReenieBeanie-Regular.ttf";
theme = createTheme(theme, {
discordFonts: {
primary: '"Whitney","Helvetica Neue","Helvetica","Arial",sans-serif',
display: '"Ginto Normal","Whitney","Helvetica Neue","Helvetica","Arial",sans-serif',
headline: '"Ginto Nord","Whitney","Helvetica Neue","Helvetica","Arial",sans-serif',
monospace: '"Menlo","Consolas","Monaco",monospace',
glitch: '"ArchivoBlack","Whitney","Helvetica Neue","Helvetica","Arial",sans-serif',
cursive: '"Reenie Beanie","Comic Sans MS",cursive,sans-serif'
}
});
function createFontFamily(fontFamily) {
return {
h1: {fontFamily},
h2: {fontFamily},
h3: {fontFamily},
h4: {fontFamily},
h5: {fontFamily},
h6: {fontFamily},
subtitle1: {fontFamily},
subtitle2: {fontFamily},
body1: {fontFamily},
body2: {fontFamily},
button: {fontFamily},
caption: {fontFamily},
overline: {fontFamily},
};
}
theme = createTheme(theme, {
typography: {
fontFamily: theme.discordFonts.primary,
...createFontFamily(theme.discordFonts.primary), // changes every default font family
}
});
/*
OVERRIDE TYPOGRAPHY
hooking into all font sizes
*/
theme = createTheme(theme, {
typography: {
h1: {
fontSize: '3.5rem'
// fontSize: 'clamp(2.625rem, 1.2857rem + 3.5714vw, 4rem)'
},
h2: {
fontSize: '3rem'
// fontSize: 'clamp(1.5rem, 0.9643rem + 1.4286vw, 2.25rem)'
},
h3: {
fontSize: '2rem',
// fontSize: '2.25rem'
},
h4: {
fontSize: '1.75rem'
},
h5: {
fontSize: '1.5rem'
},
h6: {
fontSize: '1.25rem'
},
body1: {
fontSize: '1rem'
},
body2: {
fontSize: '0.875rem'
},
button: {
fontSize: '0.875rem'
},
caption: {
fontSize: '0.75rem'
},
subtitle1: {
fontSize: '1.125rem'
// fontSize: '1rem'
},
subtitle2: {
fontSize: '0.875rem'
},
overline: {
fontSize: '0.75rem'
}
}
});
/*
OVERRIDE MUI COMPONENTS
// todo button padding needs to be adjusted -- make it wider on 'sm' screens
*/
theme = createTheme(theme, {
components: {
MuiContainer: {
defaultProps: {
disableGutters: true
}
},
},
});
export default theme