/
Main.js
60 lines (52 loc) · 1.01 KB
/
Main.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
/* React */
import React from 'react';
import PropTypes from 'prop-types';
/* Styled */
import styled, { createGlobalStyle } from 'styled-components';
/* Sub Components */
import Header from './Header';
import Footer from './Footer';
import SideBar from './SideBar';
import Section from './Section';
/* Global Styled */
const GlobalStyle = createGlobalStyle`
html, body {
height: 100%
}
body {
padding: 0;
margin: 0;
}
#root {
height: 100%;
}
`;
/* Styled Components */
const Container = styled.div`
height: 100%;
`;
/* Main Compoent */
const Main = props => {
/* Props */
const {
className, /*폴더 명*/
children, /*하위 항목의 const*/
} = props;
/* Renderer */
return (
<Container className={ className }>
<GlobalStyle />
<SideBar/>
<Section >
{ children }
</Section>
</Container>
);
}
/* Main Component Settings */
Main.propTypes = {
className: PropTypes.string,
children: PropTypes.node,
}
/* Exports */
export default Main;