From f0f31c7cbd687ac65521250810a23380bf5b8bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 12 May 2026 21:28:41 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A8=20Fix=20code=20examples=20for?= =?UTF-8?q?=20SwitchToggle=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SwitchToggle.stories.ts | 93 +++++++++++++++++++------- 1 file changed, 67 insertions(+), 26 deletions(-) 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" }}', + }, + }, + }, }; From ed2156dc661867ed6f9aa9121f71e63b45baa845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 12 May 2026 21:29:06 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A8=20Remove=20not=20needed=20stor?= =?UTF-8?q?y=20injection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BaseBadge.stories.ts | 6 ------ 1 file changed, 6 deletions(-) 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: {