Skip to content

Instantly share code, notes, and snippets.

@mbixby
Created January 24, 2023 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbixby/280ec1594f93e1ccf27abb6b86be1df3 to your computer and use it in GitHub Desktop.
Save mbixby/280ec1594f93e1ccf27abb6b86be1df3 to your computer and use it in GitHub Desktop.
// .storybook/main.js
const excludedProps = ['as', 'forwardedAs', 'theme', 'ref']
module.exports = {
// ...
typescript: {
check: false,
checkOptions: {},
reactDocgen: react-docgen-typescript
reactDocgenTypescriptOptions: {
propFilter: (prop) =>
(prop.parent ? !/node_modules/.test(prop.parent.fileName) : true) && excludedProps.indexOf(prop.name) < 0,
shouldExtractLiteralValuesFromEnum: true,
shouldRemoveUndefinedFromOptional: true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment