Skip to content

Commit

Permalink
chore: update storybook configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroreisvieira committed Oct 24, 2024
1 parent 7f0b866 commit 20e2d97
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ const config: StorybookConfig = {
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
],
typescript: {
reactDocgen: "react-docgen-typescript",
reactDocgenTypescriptOptions: {
// Speeds up Storybook build time
compilerOptions: {
allowSyntheticDefaultImports: false,
esModuleInterop: false,
},
// Makes union prop types like variant and size appear as select controls
shouldExtractLiteralValuesFromEnum: true,
// Makes string and boolean types that can be undefined appear as inputs and switches
shouldRemoveUndefinedFromOptional: true,
// Prop filter, which excludes props from node_modules
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
},
},
core: {
builder: "@storybook/builder-vite",
},
Expand Down

0 comments on commit 20e2d97

Please sign in to comment.