From 05c9066c220f9e37dc4cd56da6fdc06dc38853e0 Mon Sep 17 00:00:00 2001 From: chaeminseok Date: Wed, 13 Sep 2023 00:37:12 +0900 Subject: [PATCH] Create: CommuteButtonComponent --- src/components/common/Header.tsx | 22 +---------- .../commute/CommuteButtonComponent.tsx | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 src/components/commute/CommuteButtonComponent.tsx diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index 0e82e086..d22a7f6d 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -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; @@ -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 ( @@ -81,10 +66,7 @@ const Header = () => { - - - commute - + diff --git a/src/components/commute/CommuteButtonComponent.tsx b/src/components/commute/CommuteButtonComponent.tsx new file mode 100644 index 00000000..d74e45be --- /dev/null +++ b/src/components/commute/CommuteButtonComponent.tsx @@ -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 ( + + + commute + + ); +}; + +export default CommuteButtonComponent;