import type { Meta, StoryObj } from '@storybook/vue3-vite' import { ref } from 'vue' import { Checkbox as NychCheckbox, CheckboxGroup as NychCheckboxGroup } from '@nychthemeron/library' const meta = { title: 'Components/Checkbox', component: NychCheckbox, parameters: { layout: 'centered', }, tags: ['autodocs'], } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { render: () => ({ components: { NychCheckbox }, setup() { const checked = ref(false) return { checked } }, template: ``, }), } export const Checked: Story = { render: () => ({ components: { NychCheckbox }, setup() { const checked = ref(true) return { checked } }, template: ``, }), } export const Disabled: Story = { render: () => ({ components: { NychCheckbox }, template: `
`, }), } export const WithLabels: Story = { render: () => ({ components: { NychCheckbox }, setup() { const honey = ref(true) const wine = ref(false) const laurel = ref(false) return { honey, wine, laurel } }, template: `
`, }), } // CheckboxGroup shares layout and a name across children; each checkbox still owns its own v-model. export const Group: Story = { render: () => ({ components: { NychCheckbox, NychCheckboxGroup }, setup() { const honey = ref(true) const wine = ref(false) const laurel = ref(false) return { honey, wine, laurel } }, template: `
`, }), }