-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from DDD-Community/feature/67
[FEATURE/67] 헤더 컴포넌트 추가
- Loading branch information
Showing
6 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import Header from '@/components/Header' | ||
|
||
const Page = () => { | ||
return ( | ||
<div className="min-h-dvh"> | ||
<Header | ||
title="내 보드 목록" | ||
description="총 4개" | ||
leftButton={<Header.BackButton />} | ||
/> | ||
|
||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Header from '@/components/Header' | ||
|
||
const Page = () => { | ||
return ( | ||
<div className="min-h-dvh"> | ||
<Header title="탈퇴하기" leftButton={<Header.BackButton />} /> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Header from '@/components/Header' | ||
|
||
const Page = () => { | ||
return ( | ||
<div className="min-h-dvh"> | ||
<Header title="프로필 수정" leftButton={<Header.BackButton />} /> | ||
<div> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus amet | ||
atque consectetur culpa, doloribus earum eius eos eum fuga fugiat harum | ||
ipsam laborum omnis quae sint tenetur totam ut voluptates. | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use client' | ||
|
||
import BackIcon from 'public/icons/arrow_back_ios.svg' | ||
import { useRouter } from 'next/navigation' | ||
|
||
const HeaderBackButton = () => { | ||
const router = useRouter() | ||
|
||
return <BackIcon onClick={() => router.back()} /> | ||
} | ||
|
||
export default HeaderBackButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ReactNode } from 'react' | ||
import HeaderBackButton from '@/components/Header/HeaderBackButton' | ||
|
||
interface HeaderProps { | ||
title?: string | ||
description?: string | ||
leftButton?: ReactNode | ||
rightButton?: ReactNode | ||
} | ||
|
||
const Header = ({ | ||
title = '', | ||
description = '', | ||
leftButton = null, | ||
rightButton = null, | ||
}: HeaderProps) => { | ||
return ( | ||
<> | ||
<header className="fixed grid h-16 w-full max-w-md grid-cols-3 justify-between bg-gray-0 p-5 shadow-header"> | ||
<div className="justify-self-start">{leftButton}</div> | ||
<div className="justify-self-center"> | ||
<div className="text-center text-md font-semiBold leading-6"> | ||
{title} | ||
</div> | ||
<div className="mt-1 text-center text-xs font-regular leading-4 text-gray-700"> | ||
{description} | ||
</div> | ||
</div> | ||
<div className="justify-self-end">{rightButton}</div> | ||
</header> | ||
<div className="block h-16 w-full" /> | ||
</> | ||
) | ||
} | ||
|
||
Header.BackButton = HeaderBackButton | ||
|
||
export default Header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters