diff --git a/src/components/BaseBadge.stories.ts b/src/components/BaseBadge.stories.ts index f095160..7633996 100644 --- a/src/components/BaseBadge.stories.ts +++ b/src/components/BaseBadge.stories.ts @@ -23,12 +23,6 @@ export default meta; type Story = StoryObj; export const Standard: Story = { - decorators: [ - (story) => ({ - components: { story }, - template: ``, - }), - ], parameters: { docs: { source: { diff --git a/src/components/SwitchToggle.stories.ts b/src/components/SwitchToggle.stories.ts index 3aa20dd..4821906 100644 --- a/src/components/SwitchToggle.stories.ts +++ b/src/components/SwitchToggle.stories.ts @@ -15,37 +15,72 @@ const meta: Meta = { // Spying on the update event breaks reactivity. // 'onUpdate:modelValue': fn(), // Spy on the update event for v-model disabled: false, - label: 'Label text', - noLegend: false, + label: null, + noLegend: true, }, }; export default meta; type Story = StoryObj; -export const Legend: Story = { +export const Standard: Story = { + parameters: { + docs: { + source: { + code: '', + }, + }, + }, +}; + +export const Label: Story = { args: { - name: 'legend', - noLegend: false, - modelValue: false, + name: 'retro_mode', + label: 'Activate retro mode', + }, + parameters: { + docs: { + source: { + code: '', + }, + }, }, }; -export const NoLegend: Story = { + +export const Legend: Story = { args: { - name: 'nolegend', - noLegend: true, - modelValue: false, + name: 'retro_mode', + noLegend: false, + }, + parameters: { + docs: { + source: { + code: '', + }, + }, }, }; + export const Disabled: Story = { - args: { - name: 'disabled', - disabled: true, - modelValue: false, + render: () => ({ + components: { SwitchToggle }, + template: ` +
+ + +
+ `, + }), + parameters: { + docs: { + source: { + code: '\n', + }, + }, }, }; -export const WithVModel: Story = { +export const VModel: Story = { render: (args) => ({ components: { SwitchToggle }, setup() { @@ -58,18 +93,21 @@ export const WithVModel: Story = { }, template: `
- +

Current State: {{ currentState ? 'ON' : 'OFF' }}

`, }), + parameters: { + docs: { + source: { + code: '\n\nCurrent State: {{ currentState ? "ON" : "OFF" }}', + }, + }, + }, }; -export const WithoutVModel: Story = { +export const Events: Story = { render: (args) => ({ components: { SwitchToggle }, setup() { @@ -87,13 +125,16 @@ export const WithoutVModel: Story = { }, template: `
- +

Current State: {{ currentState ? 'ON' : 'OFF' }}

`, }), + parameters: { + docs: { + source: { + code: '\n\nCurrent State: {{ currentState ? "ON" : "OFF" }}', + }, + }, + }, };