Skip to content

Commit

Permalink
Button story fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dlnr committed Oct 15, 2024
1 parent e1473c9 commit 4a0f2a5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions storybook/src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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<typeof Button>

Expand Down

0 comments on commit 4a0f2a5

Please sign in to comment.