From 4a0f2a52b87944f73c38da8c1c9ccdb9255d5876 Mon Sep 17 00:00:00 2001 From: Niels Roozemond Date: Tue, 15 Oct 2024 14:25:37 +0200 Subject: [PATCH] Button story fix --- storybook/src/components/Button/Button.stories.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/storybook/src/components/Button/Button.stories.tsx b/storybook/src/components/Button/Button.stories.tsx index 73dc3cc0ee..224cc92a8a 100644 --- a/storybook/src/components/Button/Button.stories.tsx +++ b/storybook/src/components/Button/Button.stories.tsx @@ -14,6 +14,9 @@ const meta = { children: 'Versturen', disabled: false, variant: 'primary', + /* This is the only was storybook will honor the conditional in the iconPosition argType (line 29) */ + // @ts-ignore + icon: null, }, argTypes: { disabled: { @@ -22,6 +25,14 @@ const meta = { icon: { table: { disable: true }, }, + iconPosition: { + if: { arg: 'icon', neq: null }, + control: { + type: 'inline-radio', + labels: { undefined: 'end', start: 'start', only: 'only' }, + }, + options: [undefined, 'start', 'only'], + }, }, } satisfies Meta