/
App.jsx
57 lines (53 loc) · 1.15 KB
/
App.jsx
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
import styled, { createGlobalStyle } from "styled-components";
import Headline from "./Headline";
import Todos from "./Todos";
import MailForm from "./MailForm";
import AppLayout from "./AppLayout";
export const GlobalStyle = createGlobalStyle`
* {
margin: 0;
padding: 0;
}
input {
outline: none;
}
button {
cursor: pointer;
}
body {
font-size: 16px;
color: #4d4d4d;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #f5f5f5;
}
`;
const AppContainer = styled.div`
height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
`;
const App = () => {
console.log("render <App />");
return (
<>
<GlobalStyle />
<AppContainer>
<AppLayout
headline={<Headline />}
newsletter={
<MailForm
onSubscribeNewsletter={(firstName) =>
console.log(`Subscribe newsletter for ${firstName}`)
}
/>
}
>
<Todos />
</AppLayout>
</AppContainer>
</>
);
};
export default App;