-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrap-with-provider.js
41 lines (37 loc) · 988 Bytes
/
wrap-with-provider.js
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
import React from "react"
import Helmet from "react-helmet"
import CssBaseline from "@material-ui/core/CssBaseline"
import { ThemeProvider, createMuiTheme } from "@material-ui/core/styles"
import blue from "@material-ui/core/colors/blue"
import grey from "@material-ui/core/colors/grey"
const theme = createMuiTheme({
palette: {
primary: {
main: grey[800],
},
secondary: {
main: blue["A200"],
},
},
})
// eslint-disable-next-line react/display-name,react/prop-types
export default ({ element }) => {
return (
<>
<CssBaseline />
<ThemeProvider theme={theme}>
<Helmet>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
</Helmet>
{element}
</ThemeProvider>
</>
)
}