import { commonArgTypes, weightOptions, typoSizeOptions } from '@/lib/constants';
import type { Meta } from '@storybook/vue3';
import { type IWeight } from '@/lib/types';
import Text from '@/lib/components/Text';
type ITextWeight = IWeight | 'light';
const textWeightOption: ITextWeight[] = ['light', ...weightOptions];
const meta = {
title: 'Typography/Text',
component: Text,
parameters: {
themes: {
themeOverride: 'dark'
}
},
argTypes: {
size: {
...commonArgTypes.typoSize,
description: '폰트 크기'
},
weight: {
table: {
category: 'Theme Props',
type: { summary: textWeightOption.join(' | ') }
},
options: textWeightOption,
control: { type: 'select' },
defaultValue: { summary: 'medium' },
description: '폰트 두께'
},
color: {
...commonArgTypes.color,
description: '폰트 색상',
defaultValue: { summary: 'black' }
},
default: { table: { disable: true } }
}
} as Meta;
export default meta;
export const Default = {
render: (args: {}) => ({
components: {
Text
},
setup() {
return { args };
},
template: `