Skip to content

Commit

Permalink
Create: CommuteButtonComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeminseok committed Sep 12, 2023
1 parent 7ceda2b commit 05c9066
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 20 deletions.
22 changes: 2 additions & 20 deletions src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import gelleryBlack from "../../assets/icons/header_icon/header_gellery_black_ic
import github from "../../assets/icons/header_icon/header_github_black_icon.png";
import wikiBlack from "../../assets/icons/header_icon/header_wiki_black_icon.png";
import Logo from "./Logo";
import cummute from "../../assets/icons/header_icon/header_commute_white-icon.png";
import CommuteButtonComponent from "../commute/CommuteButtonComponent";

const HeaderBox = styled.header`
width: 100vw;
Expand Down Expand Up @@ -48,21 +48,6 @@ const Span = styled.span`
padding-bottom: 0.2rem;
`;

const CommuteButton = styled.button`
background-color: #000000;
height: 100%;
border-radius: 10px;
font-size: 1rem;
padding: 0 2rem;
display: flex;
align-items: center;
cursor: pointer;
.commute_span {
color: #ffff;
margin-left: 0.5rem;
}
`;

const Header = () => {
return (
<HeaderBox>
Expand All @@ -81,10 +66,7 @@ const Header = () => {
<IconImg src={github} alt="github icon" className="github" />
</HeaderItem>
<HeaderItem>
<CommuteButton type="button">
<IconImg src={cummute} />
<Span className="commute_span">commute</Span>
</CommuteButton>
<CommuteButtonComponent />
</HeaderItem>
</HeaderItems>
</HeaderNav>
Expand Down
37 changes: 37 additions & 0 deletions src/components/commute/CommuteButtonComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from "react";
import styled from "styled-components";
import cummute from "../../assets/icons/header_icon/header_commute_white-icon.png";

const IconImg = styled.img`
width: 1rem;
`;

const Span = styled.span`
padding-bottom: 0.2rem;
`;

const CommuteButton = styled.button`
background-color: #000000;
height: 100%;
border-radius: 10px;
font-size: 1rem;
padding: 0 2rem;
display: flex;
align-items: center;
cursor: pointer;
.commute_span {
color: #ffff;
margin-left: 0.5rem;
}
`;

const CommuteButtonComponent = () => {
return (
<CommuteButton type="button">
<IconImg src={cummute} />
<Span className="commute_span">commute</Span>
</CommuteButton>
);
};

export default CommuteButtonComponent;

0 comments on commit 05c9066

Please sign in to comment.