import Badge from '@/lib/components/Badge'; import { appearanceOptions, commonArgTypes, radiusOptions, scalingOptions, sizeOptions, weightOptions } from '@/lib/constants'; import type { Meta } from '@storybook/vue3'; const meta = { title: 'Basic Component/Badge', component: Badge, parameters: { layout: 'centered', docs: { description: { component: '빠른 인지와 탐색을 돕기 위해 컴포넌트 근처에 표시되는 작은 문자 또는 숫자 데이터' } } }, argTypes: { radius: { ...commonArgTypes.radius, description: 'Badge 둥굴기' }, size: { ...commonArgTypes.size, table: { category: 'Props', type: { summary: sizeOptions .filter((option) => option !== 'x-small' && option !== 'x-large') .join(' | ') } }, options: sizeOptions.filter((option) => option !== 'x-small' && option !== 'x-large'), description: 'Badge 크기' }, scaling: { ...commonArgTypes.scaling, description: 'Badge 비율' }, weight: { ...commonArgTypes.weight, description: 'Badge 폰트 두께' }, color: { ...commonArgTypes.color, description: 'Badge 매인색' }, appearance: { ...commonArgTypes.appearance, table: { category: 'Props', type: { summary: appearanceOptions .filter((option) => option !== 'classic' && option !== 'ghost') .join(' | ') } }, description: 'Badge 스타일', options: appearanceOptions.filter((option) => option !== 'classic' && option !== 'ghost') } }, args: {} } as Meta; export default meta; export const Default = { render: (args: any) => ({ components: { Badge }, setup() { return { args }; }, template: `badge` }) }; export const Radius = { render: (args: any) => ({ components: { Badge }, setup() { return { args, radiusOptions }; }, template: `
` }), parameters: { docs: { source: { code: ` ` } } } }; export const Scaling = { render: (args: any) => ({ components: { Badge }, setup() { return { args, scalingOptions }; }, template: `
` }), parameters: { docs: { source: { code: ` ` } } } }; export const Weight = { render: (args: any) => ({ components: { Badge }, setup() { return { args, weightOptions }; }, template: `
` }), parameters: { docs: { source: { code: ` ` } } } }; export const Size = { render: (args: any) => ({ components: { Badge }, setup() { return { args, sizeOptions: ['small', 'medium', 'large'] }; }, template: `
` }), parameters: { docs: { source: { code: ` ` } } } }; export const Color = { render: (args: any) => ({ components: { Badge }, setup() { return { args, colorOptions: ['yellow', 'blue', 'green', 'purple'] }; }, template: `
` }), parameters: { docs: { source: { code: ` ` } } } }; export const Appearance = { render: (args: any) => ({ components: { Badge }, setup() { return { args, appearanceOptions: ['solid', 'soft', 'surface', 'outline'] }; }, template: `
` }), parameters: { docs: { source: { code: ` ` } } } };