import type { Meta, StoryObj } from '@storybook/vue3-vite' import { ref } from 'vue' import { Switch as NychSwitch } from '@nychthemeron/library' const meta = { title: 'Components/Switch', component: NychSwitch, parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { disabled: { control: { type: 'boolean' }, description: 'Disable the switch', }, }, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { render: () => ({ components: { NychSwitch }, setup() { const on = ref(false) return { on } }, template: ``, }), } export const On: Story = { render: () => ({ components: { NychSwitch }, setup() { const on = ref(true) return { on } }, template: ``, }), } export const Disabled: Story = { render: () => ({ components: { NychSwitch }, template: `
`, }), } export const WithLabel: Story = { render: () => ({ components: { NychSwitch }, setup() { const nocturnal = ref(true) return { nocturnal } }, template: ` `, }), }