import type { Meta } from '@storybook/vue3'; import NavigationMenu from '@/lib/components/NavigationMenu'; import { appearanceOptions, commonArgTypes, radiusOptions, scalingOptions, sizeOptions } from '@/lib/constants'; import Text from '@/lib/components/Text/Text.vue'; const meta = { title: 'Navigation Component/NavigationMenu', component: NavigationMenu.Root, parameters: { layout: 'centered', themes: { themeOverride: 'dark' }, docs: { description: { component: `웹사이트의 페이지를 탐색하기 위해 하이퍼텍스트 링크를 포함하고 있는 인터페이스 요소` } } }, argTypes: { radius: { ...commonArgTypes.radius, description: 'NavigationMenu border 둥굴기' }, scaling: { ...commonArgTypes.scaling, description: 'NavigationMenu 비율' }, size: { ...commonArgTypes.size, table: { category: 'Props', type: { summary: sizeOptions .filter((option) => option === 'small' || option === 'medium') .join(' | ') } }, options: sizeOptions.filter((option) => option === 'small' || option === 'medium'), description: 'NavigationMenu 크기' }, color: { ...commonArgTypes.color, description: 'NavigationMenu 메인 색' }, appearance: { description: 'NavigationMenu 스타일', table: { category: 'Props', type: { summary: appearanceOptions .filter((option) => option === 'solid' || option === 'ghost') .join(' | ') } }, options: appearanceOptions.filter((option) => option === 'solid' || option === 'ghost'), control: { type: 'select' }, defaultValue: { summary: 'ghost' } } } } as Meta; const NavigatioinMenuComponent = { NavigationMenuRoot: NavigationMenu.Root, NavigationMenuList: NavigationMenu.List, NavigationMenuIndicator: NavigationMenu.Indicator, NavigationMenuItem: NavigationMenu.Item, NavigationMenuTrigger: NavigationMenu.Trigger, NavigationMenuContent: NavigationMenu.Content, NavigationMenuViewport: NavigationMenu.Viewport, NavigationMenuLink: NavigationMenu.Link, Text }; export default meta; export const Default = { render: (args: any) => ({ components: NavigatioinMenuComponent, setup() { return { args }; }, template: `
홈페이지
타이틀 내용
타이틀 내용
개요
타이틀이 들어가는 자리입니다. 내용이 들어가는 자리입니다.
타이틀이 들어가는 자리입니다. 내용이 들어가는 자리입니다.
타이틀이 들어가는 자리입니다. 내용이 들어가는 자리입니다.
tailwind 바로가기
` }) }; export const Color = { render: (args: any) => ({ components: NavigatioinMenuComponent, setup() { return { args, colorOptions: ['crimson', 'green', 'violet'] }; }, template: `
` }), parameters: { docs: { source: { code: `
` } } } }; export const Radius = { render: (args: any) => ({ components: NavigatioinMenuComponent, setup() { return { args, radiusOptions }; }, template: `
` }), parameters: { docs: { source: { code: `
` } } } }; export const Size = { render: (args: any) => ({ components: NavigatioinMenuComponent, setup() { return { args, sizeOptions: ['small', 'medium'] }; }, template: `
` }), parameters: { docs: { source: { code: `
` } } } }; export const Appearance = { render: (args: any) => ({ components: NavigatioinMenuComponent, setup() { return { args, appearanceOptions: ['ghost', 'solid'] }; }, template: `
` }), parameters: { docs: { source: { code: `
` } } } }; export const Scaling = { render: (args: any) => ({ components: NavigatioinMenuComponent, setup() { return { args, scalingOptions }; }, template: `
` }), parameters: { docs: { source: { code: `
` } } } };