I'm using TypeScript to add types to some StoryBook components, but I found some code and I'm confused as to how it's being used. The component exports multiple components and a Button which has a onClick event.
I can see the the action being logged in the actions panels, but TypeScript is complaining that Property 'MainComponent.Button (onClick)' does not exist on type ...
<MainComponent.Button onClick={args['MainComponent.Button (onClick)']}>
And the argTypes defined as follow:
...
argTypes: {
'MainComponent.Button (onClick)': {
action: 'MainComponent.Button (onClick)',
description: 'callback function fired when button is clicked'
},
...