import type { Meta, StoryObj } from '@storybook/vue3-vite' import { ref } from 'vue' import { RadioButton as NychRadioButton, RadioButtonGroup as NychRadioButtonGroup, } from '@nychthemeron/library' const meta = { title: 'Components/RadioButton', component: NychRadioButton, parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { disabled: { control: { type: 'boolean' }, description: 'Disable the radio button', }, }, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { render: () => ({ components: { NychRadioButton }, setup() { const realm = ref('underworld') return { realm } }, template: `
`, }), } export const Disabled: Story = { render: () => ({ components: { NychRadioButton }, setup() { const realm = ref('sky') return { realm } }, template: `
`, }), } export const WithLabels: Story = { render: () => ({ components: { NychRadioButton }, setup() { const god = ref('apollo') return { god } }, template: `

Chosen: {{ god }}

`, }), } // RadioButtonGroup binds the v-model once on the group and shares a name across // children — the children only carry a `value`. export const Group: Story = { render: () => ({ components: { NychRadioButton, NychRadioButtonGroup }, setup() { const god = ref('apollo') return { god } }, template: `

Chosen: {{ god }}

`, }), }