-
Notifications
You must be signed in to change notification settings - Fork 1
/
gatsby-browser.js
64 lines (55 loc) · 1.38 KB
/
gatsby-browser.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import React from "react";
import { ThemeProvider, createGlobalStyle } from "styled-components";
import Theme from "./src/themes/theme";
import { AppContextProviderComponent } from "./src/context/context";
import MainLayout from "/src/layouts/main-layout";
const GlobalStyles = createGlobalStyle`
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body, html {
font-family: ${prop => prop.theme.fonts.main};
height: 100%;
background-color: ${prop => prop.theme.colors.main1};
}
form > h2 {
text-align: center;
display: block;
font-size: 1.4em;
font-weight: bold;
padding: 0px 0px 0px 0px;
line-height: 26px;
letter-spacing: 0px;
font-family: ${prop => prop.theme.fonts.title};
}
form label {
display: block;
}
form input {
display: block;
}
h2 {
margin-top: 3rem;
margin-bottom: 1rem;
}
.category, a {
font-family: ${prop => prop.theme.fonts.links};
}
.category {
font-family: ${prop => prop.theme.fonts.links};
}
`
export const wrapRootElement = ({element}) => {
return (
<ThemeProvider theme={Theme}>
<GlobalStyles />
<AppContextProviderComponent>
<MainLayout>
{element}
</MainLayout>
</AppContextProviderComponent>
</ThemeProvider>
);
};