-
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.
- 기본 레이아웃
- Loading branch information
Showing
8 changed files
with
71 additions
and
14 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 { NAV_ITEMS } from '@/data/constants'; | ||
import { Space } from 'antd'; | ||
import { Header } from 'antd/es/layout/layout'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
export default function MyHeader() { | ||
return ( | ||
<Header style={{ backgroundColor: 'palegreen' }}> | ||
<Space size="large"> | ||
{NAV_ITEMS.map((item) => ( | ||
<Link to={item.href}>{item.label}</Link> | ||
))} | ||
</Space> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Layout } from 'antd'; | ||
import { Content } from 'antd/es/layout/layout'; | ||
import { Outlet } from 'react-router-dom'; | ||
import MyHeader from './MyHeader'; | ||
|
||
export default function MyLayout() { | ||
return ( | ||
<Layout style={{ display: 'flex', minHeight: '100vh' }}> | ||
<MyHeader /> | ||
<Content | ||
style={{ | ||
flex: 1, | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}} | ||
> | ||
<Outlet /> | ||
</Content> | ||
</Layout> | ||
); | ||
} |
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,18 @@ | ||
export const NAV_ITEMS = [ | ||
{ | ||
label: '홈', | ||
href: '/', | ||
}, | ||
{ | ||
label: '로그인', | ||
href: '/signin', | ||
}, | ||
{ | ||
label: '회원가입', | ||
href: '/signup', | ||
}, | ||
{ | ||
label: '내계정', | ||
href: '/myaccount', | ||
}, | ||
]; |
Empty file.
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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
import { theme } from 'antd'; | ||
|
||
export default function Home() { | ||
return <div>홈🏠🏠🏠🏠</div>; | ||
const { | ||
token: { colorPrimary, colorPrimaryBg, colorSuccess }, | ||
} = theme.useToken(); | ||
|
||
return ( | ||
<div> | ||
홈🏠🏠🏠🏠 <span style={{ color: colorPrimary }}>사용하고 싶으색</span>{' '} | ||
<span style={{ backgroundColor: colorPrimaryBg }}>원하는 색을</span>{' '} | ||
<span style={{ color: colorSuccess }}>theme에서 가져와서 사용</span> | ||
</div> | ||
); | ||
} |