-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ feat ] Header 컴포넌트 구현 #14
Changes from 1 commit
0209636
062e8cd
0a7d0b7
f7f5e69
16a2ff4
7ebcc34
4ca4f7f
fd8fa9b
3a28919
86b05d0
dd81a6b
c9e6c0b
86a239f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,127 @@ | ||
import styled from '@emotion/styled'; | ||
import { useRouter } from 'next/router'; | ||
import { IcNoriHeaderLogo, IcSearchIcon } from '../../public/assets/icons'; | ||
|
||
export default function Header() { | ||
return <StHeaderWrapper></StHeaderWrapper>; | ||
const router = useRouter(); | ||
|
||
return ( | ||
<StHeaderWrapper> | ||
<StTopLink> | ||
<p> | ||
<a>고객센터</a> | <a>마이페이지</a> | <a>로그인</a> | ||
</p> | ||
</StTopLink> | ||
<StHeaderContents> | ||
<IcNoriHeaderLogo type="button" onClick={() => router.push('/')} /> | ||
<StSearchWrapper> | ||
<StSearchBar> | ||
<input placeholder="상품명, 스토어명을 검색해보세요!" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. input type도 적어주면 좋을 것 같아용 |
||
<IcSearchIcon /> | ||
</StSearchBar> | ||
<StMenu> | ||
<StMenuBtn type="button" onClick={() => router.push('/toyView')}> | ||
상품보기 | ||
</StMenuBtn> | ||
<StMenuBtn type="button" onClick={() => router.push('/community')}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #1 이슈보면 하단 리뷰에 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아아 맞다맞다 바로 수정할게유 |
||
커뮤니티 | ||
</StMenuBtn> | ||
<StMenuBtn>ABOUT</StMenuBtn> | ||
</StMenu> | ||
</StSearchWrapper> | ||
</StHeaderContents> | ||
</StHeaderWrapper> | ||
); | ||
} | ||
|
||
const StHeaderWrapper = styled.header` | ||
position: sticky; | ||
padding-top: 32px; | ||
top: -32px; | ||
top: -3.2rem; | ||
|
||
width: 100%; | ||
height: 11.4rem; | ||
|
||
background-color: #31cc94; | ||
color: #ffffff; | ||
`; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 우리 컨벤션에서 스타일드 컴포넌트 사이에는 띄어쓰기 안 하는걸로 했어용! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 확인! 바로 수정할게!! |
||
const StTopLink = styled.div` | ||
display: flex; | ||
align-items: center; | ||
|
||
padding: 0rem; | ||
padding-top: 0.7rem; | ||
padding-left: 75%; | ||
|
||
font-style: normal; | ||
font-weight: 400; | ||
font-size: 1.2rem; | ||
line-height: 1.6rem; | ||
`; | ||
|
||
const StHeaderContents = styled.section` | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
|
||
width: 100%; | ||
margin-top: 2.9rem; | ||
`; | ||
|
||
const StSearchWrapper = styled.div` | ||
display: flex; | ||
align-items: center; | ||
|
||
gap: 4.8rem; | ||
`; | ||
|
||
const StSearchBar = styled.div` | ||
display: flex; | ||
justify-content: space-evenly; | ||
align-items: center; | ||
|
||
width: 28.5rem; | ||
height: 4.2rem; | ||
|
||
background: rgba(255, 255, 255, 0.14); | ||
border-radius: 0.8rem; | ||
|
||
input { | ||
height: 2.2rem; | ||
width: 22rem; | ||
|
||
color: rgba(255, 255, 255, 0.75); | ||
font-family: 'Pretendard'; | ||
font-style: normal; | ||
font-weight: 500; | ||
font-size: 1.6rem; | ||
line-height: 140%; | ||
|
||
&::placeholder { | ||
color: rgba(255, 255, 255, 0.75); | ||
} | ||
|
||
:focus::placeholder { | ||
opacity: 0; | ||
} | ||
} | ||
`; | ||
|
||
const StMenu = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
width: 27.3rem; | ||
height: 2.6rem; | ||
gap: 3.2rem; | ||
|
||
line-height: 2.6rem; | ||
`; | ||
|
||
const StMenuBtn = styled.button` | ||
color: #ffffff; | ||
font-weight: 500; | ||
font-size: 1.8rem; | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as IcNoriLogo } from './noriLogoIcon.svg'; | ||
export { default as IcNoriHeaderLogo } from './noriHeaderIcon.svg'; | ||
export {default as IcSearchIcon } from './searchIcon.svg'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Svg에도 타입을 지정해줘야 하나,,,?!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음 일단은 버튼 기능을 해서 지정은 해 뒀는데 굳이 할 필요 없으려나??