Toggle navigation
Toggle navigation
This project
Loading...
Sign in
HyeonJun Jeon
/
Extended-Calendar
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
HyeonJun Jeon
2022-05-27 14:24:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d23b79d67c29473a0adeccbefb78204499aef893
d23b79d6
1 parent
f79b53f6
[Style] Make Month include GridHead and Grid
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
14 deletions
src/components/Grid.js
src/components/Month.js
src/styles/Grid.css → src/styles/Month.css
src/components/Grid.js
View file @
d23b79d
import
"../styles/Grid.css"
;
import
GridHead
from
"./GridHead.js"
;
import
GridRow
from
"./GridRow.js"
;
import
React
,
{
useContext
}
from
"react"
;
import
{
CalendarStateContext
}
from
"../pages/Calendar"
;
import
{
moveDate
,
toSunday
}
from
"../utils/Dates"
;
import
React
,
{
useContext
}
from
"react"
;
const
Grid
=
()
=>
{
const
[
state
]
=
useContext
(
CalendarStateContext
);
const
{
state
}
=
useContext
(
CalendarStateContext
);
const
renderRows
=
()
=>
{
const
rows
=
[];
...
...
@@ -23,12 +21,7 @@ const Grid = () => {
return
rows
;
};
return
(
<
div
className
=
"Grid"
>
<
GridHead
/>
{
renderRows
()}
<
/div
>
);
return
<
div
className
=
"Grid"
>
{
renderRows
()}
<
/div>
;
};
export
default
Grid
;
...
...
src/components/Month.js
0 → 100644
View file @
d23b79d
import
Grid
from
"./Grid"
;
import
GridHead
from
"./GridHead"
;
import
"../styles/Month.css"
;
const
Month
=
()
=>
{
return
(
<
div
className
=
"Month"
>
<
GridHead
/>
<
Grid
/>
<
/div
>
);
};
export
default
Month
;
src/styles/
Grid
.css
→
src/styles/
Month
.css
View file @
d23b79d
.Month
{
display
:
flex
;
flex-direction
:
column
;
flex-grow
:
1
;
}
.GridItem
,
.GridHeadItem
{
border-style
:
solid
;
border-width
:
thin
;
height
:
150px
;
flex-basis
:
100px
;
flex-grow
:
1
;
}
.GridItem
{
border
:
solid
thin
lightgray
;
height
:
150px
;
padding
:
5px
;
}
...
...
@@ -20,9 +28,16 @@
display
:
flex
;
}
.GridHead
{
margin-right
:
16.8px
;
}
.Grid
{
display
:
flex
;
flex-direction
:
column
;
overflow-y
:
auto
;
height
:
calc
(
100vh
-
85px
-
50px
);
border
:
solid
thin
gray
;
}
.GridItem
[
relative
]
>
span
{
...
...
Please
register
or
login
to post a comment