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-05-17 00:10:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ad9505320ae2f7274cdb3caef557b09c31e252cf
ad950532
1 parent
96f96a95
update Button component
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
19 deletions
front/src/Components/Button.js
front/src/Routes/Menu/MenuPresenter.js
front/src/Components/Button.js
View file @
ad95053
...
...
@@ -4,6 +4,7 @@ import propTypes from "prop-types";
const
Container
=
styled
.
button
`
border: 0;
width: 100%;
`
;
const
Button
=
({
text
})
=>
<
Container
>
{
text
}
<
/Container>
;
...
...
front/src/Routes/Menu/MenuPresenter.js
View file @
ad95053
...
...
@@ -10,6 +10,7 @@ import {
faTags
,
}
from
"@fortawesome/free-solid-svg-icons"
;
import
{
BrowserRouter
as
Router
,
Link
}
from
"react-router-dom"
;
import
Button
from
"../../Components/Button"
;
const
MenuBar
=
styled
.
div
`
width: 15%;
...
...
@@ -59,7 +60,6 @@ const FuncIconBox = styled.div`
color: white;
`
;
// 개별 아이콘을 상자로 묶기 위한 변수
const
IconBox
=
styled
.
div
`
display: flex;
flex-direction: row;
...
...
@@ -73,20 +73,8 @@ const IconBox = styled.div`
}
`
;
const
ExitIconBox
=
styled
.
div
`
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
opacity: 0.8;
svg {
font-size: 20px;
margin-right: 5px;
}
`
;
const
IconName
=
styled
.
span
`
font-size: 1
0
px;
font-size: 1
5
px;
`
;
const
StyledLink
=
styled
(
Link
)
`
...
...
@@ -135,9 +123,27 @@ const StyledLink = styled(Link)`
)
return
"center"
;
}};
button
{
width
:
100
%
;
height
:
100
%
;
color
:
white
;
background
-
color
:
#
667
aff
;
display
:
flex
;
flex
-
direction
:
row
;
align
-
items
:
center
;
justify
-
content
:
center
;
opacity
:
0.8
;
font
-
size
:
20
px
;
}
svg
.
SignOut
{
font
-
size
:
20
px
;
position
:
absolute
;
left
:
50
px
;
opacity
:
3
;
}
`;
export default () => {
export default (
{ logOut }
) => {
return (
<MenuBar>
<TitleBox>
...
...
@@ -176,10 +182,8 @@ export default () => {
</StyledLink>
</FuncIconBox>
<StyledLink to="/" className="LogOutLink">
<ExitIconBox>
<FontAwesomeIcon icon={faSignOutAlt} />
<IconName /> Log Out
</ExitIconBox>
<FontAwesomeIcon icon={faSignOutAlt} className="SignOut" />
<Button text={"Log Out"} onClick={logOut}></Button>
</StyledLink>
</Router>
</MenuBar>
...
...
Please
register
or
login
to post a comment