How to conditionally show global Storybook argTypes?

Viewed 112

In Storybook 6 my components have common properties such as theme, size, etc. which apply to 90% of my components. I want to define the controls for those props in a global way so I don't have to duplicate it for each story.

This works when you define global argTypes however if a component does not have one of these props, Storybook still renders the prop in the table but does not show any control for it.

How do I prevent the prop from being rendered at all in the props table but still be defined in a global way?

0 Answers
Related