You've already forked AstralRinth
forked from didirus/AstralRinth
daf804947c
* add storybook * clean up stories * small fix * add stories for all components * add vintl * default to dark mode * fix teleport * add theme addon * add new modal story * delete broken stories * move all stories to central stories folder * fix paths * add pnpm run storybook * remove chromatic * add add-stories.md * fix types * fix unncessary args field * cover more addordion states * pt2 * remove old vintl * fix: missing style + ctx --------- Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/vue3-vite'
|
|
|
|
import Checkbox from '../../components/base/Checkbox.vue'
|
|
|
|
const meta = {
|
|
title: 'Base/Checkbox',
|
|
component: Checkbox,
|
|
} satisfies Meta<typeof Checkbox>
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
label: 'Accept terms and conditions',
|
|
modelValue: false,
|
|
},
|
|
}
|
|
|
|
export const Checked: Story = {
|
|
args: {
|
|
label: 'Accept terms and conditions',
|
|
modelValue: true,
|
|
},
|
|
}
|
|
|
|
export const Disabled: Story = {
|
|
args: {
|
|
label: 'Disabled checkbox',
|
|
modelValue: false,
|
|
disabled: true,
|
|
},
|
|
}
|
|
|
|
export const Indeterminate: Story = {
|
|
args: {
|
|
label: 'Indeterminate state',
|
|
modelValue: false,
|
|
indeterminate: true,
|
|
},
|
|
}
|
|
|
|
export const AllStates: StoryObj = {
|
|
render: () => ({
|
|
components: { Checkbox },
|
|
template: /*html*/ `
|
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
<Checkbox label="Unchecked" :model-value="false" />
|
|
<Checkbox label="Checked" :model-value="true" />
|
|
<Checkbox label="Indeterminate" :model-value="false" :indeterminate="true" />
|
|
<Checkbox label="Disabled unchecked" :model-value="false" :disabled="true" />
|
|
<Checkbox label="Disabled checked" :model-value="true" :disabled="true" />
|
|
</div>
|
|
`,
|
|
}),
|
|
}
|