Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-04-29 20:48:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8391ff481bcef025e2a97d1ce586554aa4fc8d79
8391ff48
1 parent
56490b94
create react codes for testing
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
24 deletions
front/src/Components/Header.js
front/src/Components/MenuList.js
front/src/Hooks/useSwitch.js
front/src/Components/Header.js
View file @
8391ff4
...
...
@@ -7,6 +7,9 @@ const Header = Styled.div`
justify-content: center;
margin: 10px 0px;
font-size: 25px;
font-family: 'Source Code Pro';
font-weight: 200;
font-size: 40px;
`
;
export
default
()
=>
{
...
...
front/src/Components/MenuList.js
View file @
8391ff4
import
React
from
"react"
;
import
Styled
from
"styled-components"
;
import
{
FontAwesomeIcon
}
from
"@fortawesome/react-fontawesome"
;
import
{
faList
,
faAddressBook
}
from
"@fortawesome/free-solid-svg-icons"
;
import
PropTypes
from
"prop-types"
;
const
MenuBox
=
Styled
.
div
`
width: 30%;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
border-top: 1px solid black;
border-right: 1px solid black;
const
Container
=
Styled
.
div
`
width: 400px;
height: 100%;
`
;
const
MenuList
=
Styled
.
ol
`
`
;
const
MenuItem
=
Styled
.
li
`
`
;
const
Switch
=
({
checked
=
false
,
isChecked
,
onClick
})
=>
(
<
Container
checked
=
{
checked
}
onClick
=
{
onClick
}
isChecked
=
{
isChecked
}
/
>
);
const
Link
=
Styled
.
a
`
`
;
Switch
.
propTypes
=
{
checked
:
PropTypes
.
bool
,
isChecked
:
PropTypes
.
func
,
onClick
:
PropTypes
.
func
,
};
export
default
()
=>
{
return
(
<
MenuBox
>
<
MenuList
>
<
MenuItem
>
<
Link
href
=
""
>
1
.
What
is
KHU
Chat
?
<
/Link
>
<
/MenuItem
>
<
/MenuList
>
<
/MenuBox
>
);
return
<
Switch
/>
;
};
...
...
front/src/Hooks/useSwitch.js
0 → 100644
View file @
8391ff4
import
{
useState
}
from
"react"
;
export
default
(
args
)
=>
{
const
[
value
,
setValue
]
=
useState
(
args
);
const
onClick
=
(
e
)
=>
{};
};
Please
register
or
login
to post a comment