-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
위치가 '/' 일때와 아닐때의 ui 변화 표시 스포티파이 polaris VideoThumbnail.stories 참고 url: https://github.com/Shopify/polaris/blob/36e4ee8afbc7dbec6e65225384629afa83f64a75/polaris-react/src/components/VideoThumbnail/VideoThumbnail.stories.tsx#L4
- Loading branch information
Showing
1 changed file
with
46 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,46 @@ | ||
import { useRouter } from 'next/router'; | ||
|
||
import Header from '@/components/common/Header'; | ||
import LeftButton from '@/components/common/Header/buttons/LeftButton'; | ||
import RightButton from '@/components/common/Header/buttons/RightButton'; | ||
import TextLogo from '@/components/common/Header/buttons/TextLogo'; | ||
import * as Style from '@/components/common/Header/style'; | ||
import * as Layout from '@/components/common/layout'; | ||
|
||
import type { Meta } from '@storybook/react'; | ||
|
||
const meta = { | ||
title: 'Common/Header', | ||
component: Header, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof Header>; | ||
|
||
export default meta; | ||
|
||
export function DefaultHome() { | ||
const router = useRouter(); | ||
const isHome = true; | ||
return ( | ||
<Layout.Flex width='310px'> | ||
<Style.HeaderWrapper> | ||
<LeftButton isHome={isHome} router={router} /> | ||
<TextLogo /> | ||
<RightButton isHome={isHome} isOpen={false} toggleIsOpen={() => false} /> | ||
</Style.HeaderWrapper> | ||
</Layout.Flex> | ||
); | ||
} | ||
|
||
export function NotHome() { | ||
const router = useRouter(); | ||
const isHome = false; | ||
return ( | ||
<Layout.Flex width='310px'> | ||
<Style.HeaderWrapper> | ||
<LeftButton isHome={isHome} router={router} /> | ||
<TextLogo /> | ||
<RightButton isHome={isHome} isOpen={false} toggleIsOpen={() => false} /> | ||
</Style.HeaderWrapper> | ||
</Layout.Flex> | ||
); | ||
} |