import type { Meta, StoryObj } from '@storybook/vue3-vite'; import { ref } from 'vue'; import RadioGroupItem from '../radio-group-item.vue'; import RadioGroupLabel from '../radio-group-label.vue'; import RadioGroup from '../radio-group.vue'; const meta: Meta = { title: 'Components/Radio Group', component: RadioGroup, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { defaultValue: 'option2', orientation: 'vertical', disabled: false, name: 'radio-group', modelValue: '', dir: 'ltr', loop: true, required: true, }, render: args => ({ components: { RadioGroup, RadioGroupItem, RadioGroupLabel }, setup() { const selectedValue = ref(); return { args, selectedValue }; }, template: `
Selected: {{ selectedValue ? selectedValue : 'None' }}
`, }), };