#Storybook component config metadata during extractArgTypes

2 messages · Page 1 of 1 (latest)

hollow dragon
#

Hi folks 👋 Is there a way to get Storybook component default export metadata inside of extractArgTypes?

I was hoping to extend the component default export metadata to include info that will allow for PropType -> ArgType extraction for all component layers of a higher order component.

I don't fully understand the order of when things execute to know if the component default export is known and its context available when extractArgTypes is executed.

I am using Storybook v6.5.12 with React components
I currently have a custom extractArgTypes implementation that performs PropType inference after the default extractArgTypes functionality (using 'react-docgen')

strong sundial
#

Not currently AFAIK. I’d change it in 7.0 except that we’re planning on redoing this entirely in 7.x based on lessons from the first iteration, and I’d rather make one breaking change instead of two