Skip to content

Commit

Permalink
fix(sb): add SelectProps type params to BasicDemo
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-anderson committed Mar 9, 2024
1 parent f39ba72 commit fdf6554
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Form/inputs/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export default meta;
///////////////////////////////////////////////////////////
// STORIES

type Story = StoryObj<typeof meta>;
/**
* - **Q:** Why not use `type Story = StoryObj<typeof meta>`?
* - **A:** Such a `Story` type would not be re-usable across multiple `Select` stories
* due to the component's type params, e.g., `SelectProps<string | number | null>`.
*/

export const BasicDemo = {
args: {
Expand All @@ -37,4 +41,5 @@ export const BasicDemo = {
initialValues: { food: null },
},
},
} satisfies Story;
} satisfies StoryObj<Meta<SelectProps<string | null> & FormDecoratorArgs>>;

0 comments on commit fdf6554

Please sign in to comment.