/
Layout.tsx
65 lines (60 loc) 路 1.58 KB
/
Layout.tsx
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
import React, { Fragment, ReactElement } from 'react';
import Head from 'next/head';
import { createGlobalStyle } from 'styled-components';
import color from '../styles/color';
import fontSize from '../styles/fontSize';
import fontFamily from '../styles/fontFamily';
interface ILayout {
children: ReactElement[];
}
const CSSReset = createGlobalStyle`
html {
box-sizing: border-box;
}
html, body {
height: 100%;
min-height: 100%;
}
*, *:before, *:after {
box-sizing: inherit;
}
body, h1, h2, h3, h4, h5, h6, p, ol, ul, pre {
margin: 0;
padding: 0;
font-weight: normal;
}
textarea, input, button {
border: 0;
outline: 0;
}
body {
color: ${color.white};
background: ${color.black};
font-size: ${fontSize.base};
font-family: ${fontFamily.sans};
}
#__next {
display: grid;
grid-template-rows: auto auto 1fr;
height: 100%;
}
`;
function Layout({ children }: ILayout) {
return (
<Fragment>
<Head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Convert SVG to valid JSX" />
<meta name="keywords" content="svg, jsx, svg2jsx" />
<meta name="author" content="B膬laj Marius" />
<meta name="copyright" content="Copyright B膬laj Marius 2019. All Rights Reserved." />
<link rel="shortcut icon" href="static/favicon.ico" />
<title>Editor - Convert SVG to valid JSX</title>
</Head>
<CSSReset />
{children}
</Fragment>
);
}
export default Layout;