import Checkbox from '@/lib/components/Checkbox';
import {
appearanceOptions,
commonArgTypes,
radiusOptions,
scalingOptions,
sizeOptions
} from '@/lib/constants';
import type { Meta } from '@storybook/vue3';
const meta = {
title: 'Select Component/Checkbox',
component: Checkbox,
parameters: {
layout: 'centered',
docs: {
description: {
component: '옵션을 끄거나 켤 수 있는 입력 요소로 선택지 중 다중 선택할 수 있는 기능'
}
}
},
argTypes: {
scaling: {
...commonArgTypes.scaling,
description: '체크박스 비율'
},
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: '체크박스 크기'
},
radius: {
...commonArgTypes.radius,
description: '체크박스 둥글기'
},
color: {
...commonArgTypes.color,
description: '체크박스 메인 색'
},
appearance: {
...commonArgTypes.appearance,
description: '체크박스 스타일',
table: {
category: 'Props',
type: {
summary: appearanceOptions
.filter((option) => option !== 'ghost' && option !== 'outline' && option !== 'solid')
.join(' | ')
}
},
options: appearanceOptions.filter(
(option) => option !== 'ghost' && option !== 'outline' && option !== 'solid'
)
},
disabled: {
description: '체크박스 disabled 기본 속성',
defaultValue: { summary: 'false' },
table: {
category: 'Props',
type: { summary: 'boolean' }
},
control: { type: 'boolean' }
},
checked: {
table: {
disable: true
}
},
defaultChecked: {
table: {
disable: true
}
},
indeterminate: {
table: {
disable: true
}
}
},
args: {}
} as Meta;
export default meta;
export const Default = {
render: (args: any) => ({
components: {
Checkbox
},
setup() {
return { args };
},
template: `