diff --git a/.prettierrc b/.prettierrc.json similarity index 100% rename from .prettierrc rename to .prettierrc.json diff --git a/public/icons/index.ts b/public/icons/index.ts index 7a6a6b65..a5bd9e0d 100644 --- a/public/icons/index.ts +++ b/public/icons/index.ts @@ -2,3 +2,4 @@ export { default as IconLeftArrow } from './left-arrow.svg'; export { default as IconShare } from './share.svg'; export { default as IconPost } from './post.svg'; export { default as IconOptions } from './options.svg'; +export { default as IconMore } from './more.svg'; diff --git a/public/icons/more.svg b/public/icons/more.svg index 216ec6c5..7badbc42 100644 --- a/public/icons/more.svg +++ b/public/icons/more.svg @@ -1,3 +1,3 @@ - + diff --git a/src/stories/Base/TopHeader.stories.tsx b/src/stories/Base/TopHeader.stories.tsx new file mode 100644 index 00000000..00f9e04d --- /dev/null +++ b/src/stories/Base/TopHeader.stories.tsx @@ -0,0 +1,35 @@ +import { Meta, StoryObj } from '@storybook/react'; +import { IconMore } from '@public/icons'; +import TopHeader from '@/ui/Base/TopHeader'; + +const meta: Meta = { + title: 'Base/TopHeader', + component: TopHeader, + tags: ['autodocs'], +}; + +export default meta; + +type Story = StoryObj; + +const TopHeaderWithMenu = () => { + return ( + + + + ); +}; + +export const Default: Story = { + args: { label: 'BookArchive' }, +}; + +export const Menu: Story = { + render: () => , +}; diff --git a/src/ui/Base/TopHeader.tsx b/src/ui/Base/TopHeader.tsx new file mode 100644 index 00000000..a32a5294 --- /dev/null +++ b/src/ui/Base/TopHeader.tsx @@ -0,0 +1,17 @@ +import { ReactNode } from 'react'; + +interface TopHeaderProps { + label: string; + children?: ReactNode; +} + +const TopHeader = ({ label, children }: TopHeaderProps) => { + return ( +
+

{label}

+ {children} +
+ ); +}; + +export default TopHeader;