-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathHome.jsx
77 lines (63 loc) · 1.79 KB
/
Home.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { css, cx } from '@emotion/css'
import { Meta } from 'frontend-essentials'
import { Button, Switch, TextField, Select, MenuItem, Slider, Rating } from '@mui/material'
import pagesManifest from 'pages-manifest.json'
import Title from 'components/common/Title'
import Info from 'components/common/Info'
const { title, description } = pagesManifest.find(({ chunk }) => chunk === 'home')
const Home = () => {
return (
<div>
<Meta
title="Client-side Rendering"
description={description}
image={`${window.location.origin}/icons/og-icon.png`}
/>
<Title>{title}</Title>
<Info className={style.info}>{description}</Info>
<div className={style.inputs}>
<Button className={style.input} variant="outlined">
Button
</Button>
<Switch className={cx(style.input, style.switch)} defaultChecked />
<TextField className={style.input} variant="outlined" />
<Select className={style.input} value={10}>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
</Select>
<Slider className={cx(style.input, style.slider)} />
<Rating className={cx(style.input, style.rating)} value={4} />
</div>
</div>
)
}
const style = {
info: css`
margin-top: 20px;
`,
inputs: css`
display: flex;
flex-direction: column;
align-items: flex-start;
margin-top: 20px;
`,
input: css`
margin-top: 20px;
color: #1976d2;
.MuiOutlinedInput-notchedOutline {
border: 1px solid rgba(25, 118, 210, 0.5);
}
`,
switch: css`
margin-left: -10px;
`,
slider: css`
width: 200px;
margin-left: 10px;
`,
rating: css`
color: #1976d2;
`
}
export default Home