Showing
2 changed files
with
32 additions
and
10 deletions
... | @@ -6,13 +6,14 @@ import Grid from "@material-ui/core/Grid"; | ... | @@ -6,13 +6,14 @@ import Grid from "@material-ui/core/Grid"; |
6 | import Typography from "@material-ui/core/Typography"; | 6 | import Typography from "@material-ui/core/Typography"; |
7 | 7 | ||
8 | import Icon from "@material-ui/core/Icon"; | 8 | import Icon from "@material-ui/core/Icon"; |
9 | +import IconButton from "@material-ui/core/IconButton"; | ||
9 | // import CircularProgress from "@material-ui/core/CircularProgress"; | 10 | // import CircularProgress from "@material-ui/core/CircularProgress"; |
10 | 11 | ||
11 | import TodoCard from "./TodoCard.js"; | 12 | import TodoCard from "./TodoCard.js"; |
12 | 13 | ||
13 | const useStyles = makeStyles((theme) => ({ | 14 | const useStyles = makeStyles((theme) => ({ |
14 | root: { | 15 | root: { |
15 | - minHeight: "100vh", | 16 | + minHeight: "100%", |
16 | backgroundColor: "rgba(0,0,0,0.5)", | 17 | backgroundColor: "rgba(0,0,0,0.5)", |
17 | }, | 18 | }, |
18 | container: { | 19 | container: { |
... | @@ -28,6 +29,17 @@ const useStyles = makeStyles((theme) => ({ | ... | @@ -28,6 +29,17 @@ const useStyles = makeStyles((theme) => ({ |
28 | paddingTop: "1rem", | 29 | paddingTop: "1rem", |
29 | color: "white", | 30 | color: "white", |
30 | }, | 31 | }, |
32 | + iconButton: { | ||
33 | + margin: "0", | ||
34 | + padding: "0", | ||
35 | + position: "fixed", | ||
36 | + bottom: "3rem", | ||
37 | + right: "3rem", | ||
38 | + }, | ||
39 | + icon: { | ||
40 | + fontSize: 70, | ||
41 | + color: "white", | ||
42 | + }, | ||
31 | })); | 43 | })); |
32 | 44 | ||
33 | export default function BodyLayout() { | 45 | export default function BodyLayout() { |
... | @@ -64,15 +76,14 @@ export default function BodyLayout() { | ... | @@ -64,15 +76,14 @@ export default function BodyLayout() { |
64 | let showDate = null; | 76 | let showDate = null; |
65 | const isMine = card.name === "aa"; ////data.name과 session name 비교 로그인 구현하고 수정 | 77 | const isMine = card.name === "aa"; ////data.name과 session name 비교 로그인 구현하고 수정 |
66 | 78 | ||
67 | - | ||
68 | if (idx === 0 || card.date !== data[idx - 1].date) { | 79 | if (idx === 0 || card.date !== data[idx - 1].date) { |
69 | - showDate=( | 80 | + showDate = ( |
70 | <Typography variant="h4" className={classes.date}> | 81 | <Typography variant="h4" className={classes.date}> |
71 | {card.date} | 82 | {card.date} |
72 | </Typography> | 83 | </Typography> |
73 | ); | 84 | ); |
74 | } | 85 | } |
75 | - | 86 | + |
76 | if (isMine) { | 87 | if (isMine) { |
77 | isVisible = 1; | 88 | isVisible = 1; |
78 | } | 89 | } |
... | @@ -92,7 +103,7 @@ export default function BodyLayout() { | ... | @@ -92,7 +103,7 @@ export default function BodyLayout() { |
92 | </> | 103 | </> |
93 | ); | 104 | ); |
94 | } else { | 105 | } else { |
95 | - return <>{ showDate }</>; | 106 | + return <>{showDate}</>; |
96 | } | 107 | } |
97 | })} | 108 | })} |
98 | 109 | ||
... | @@ -100,6 +111,10 @@ export default function BodyLayout() { | ... | @@ -100,6 +111,10 @@ export default function BodyLayout() { |
100 | <Icon style={{ fontSize: 60 }}>add_circle</Icon> | 111 | <Icon style={{ fontSize: 60 }}>add_circle</Icon> |
101 | </Grid> */} | 112 | </Grid> */} |
102 | </Grid> | 113 | </Grid> |
114 | + | ||
115 | + <IconButton className={classes.iconButton}> | ||
116 | + <Icon className={classes.icon}>add_circle</Icon> | ||
117 | + </IconButton> | ||
103 | </Container> | 118 | </Container> |
104 | </div> | 119 | </div> |
105 | ); | 120 | ); | ... | ... |
... | @@ -6,6 +6,7 @@ import Typography from "@material-ui/core/Typography"; | ... | @@ -6,6 +6,7 @@ import Typography from "@material-ui/core/Typography"; |
6 | import FormControlLabel from "@material-ui/core/FormControlLabel"; | 6 | import FormControlLabel from "@material-ui/core/FormControlLabel"; |
7 | import Checkbox from "@material-ui/core/Checkbox"; | 7 | import Checkbox from "@material-ui/core/Checkbox"; |
8 | import Icon from "@material-ui/core/Icon"; | 8 | import Icon from "@material-ui/core/Icon"; |
9 | +import IconButton from "@material-ui/core/IconButton"; | ||
9 | 10 | ||
10 | const useStyles = makeStyles({ | 11 | const useStyles = makeStyles({ |
11 | root: { | 12 | root: { |
... | @@ -15,9 +16,13 @@ const useStyles = makeStyles({ | ... | @@ -15,9 +16,13 @@ const useStyles = makeStyles({ |
15 | fontSize: 14, | 16 | fontSize: 14, |
16 | float: "left", | 17 | float: "left", |
17 | }, | 18 | }, |
18 | - icon: { | 19 | + iconButton: { |
19 | - fontSize: 18, | ||
20 | float: "right", | 20 | float: "right", |
21 | + margin: "0", | ||
22 | + padding: "0", | ||
23 | + }, | ||
24 | + icon: { | ||
25 | + fontSize: 16, | ||
21 | color: "black", | 26 | color: "black", |
22 | }, | 27 | }, |
23 | title: { | 28 | title: { |
... | @@ -46,9 +51,11 @@ export default function TodoCard({ data, isMine, isVisible }) { | ... | @@ -46,9 +51,11 @@ export default function TodoCard({ data, isMine, isVisible }) { |
46 | 51 | ||
47 | if (isMine) { | 52 | if (isMine) { |
48 | settingButton = ( | 53 | settingButton = ( |
49 | - <Icon className={classes.icon} color="primary"> | 54 | + <IconButton className={classes.iconButton}> |
50 | - settings | 55 | + <Icon className={classes.icon} color="primary" on> |
51 | - </Icon> | 56 | + settings |
57 | + </Icon> | ||
58 | + </IconButton> | ||
52 | ); | 59 | ); |
53 | } | 60 | } |
54 | return ( | 61 | return ( | ... | ... |
-
Please register or login to post a comment