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: `