Open dmartinjs opened 2 years ago
This was working in a previous version of SB-WC, many of my components have public methods that need to be documented so +1 on this
@thepassle @gaetanmaisse perhaps a follow-up is needed for #15138 ?
I don't know if its related but methods doesn't seems to be exported here.
method
s are listed under members
along with field
s, so I dont think thats the issue
Hello, is there an update on how to display methods please?
We ran into a similar issue. A brief analysis seems to indicate that the problem is twofold:
custom-elements#mapData
(and that might be for a reason?):We could live with the fact that properties with clashing names are overridden, but that might not be the case for everyone.
Would prefixing the property key with its kind in mapData
be a valid solution, e.g. "method#close", "event#close"?
FYI @dreamora
Same thing for me. I need to manually add methods in ArgTypes and duplicate the description from JSDocs in order to have the methods displayed in the table
argTypes: {
show: {
control: false,
table: { category: 'Methods' },
description: 'Method that triggers the open dialog action',
},
hide: {
control: false,
table: { category: 'Methods' },
description: 'Method that triggers the close dialog action',
},
}
Describe the bug I updated my
custom-elements.json
to follow the new format introduced in Storybook 6.4, everything is displayed properly except methods who doesn't seems to be extracted from the file. exemple of a method in the custom-elements.json.To Reproduce
System
Additional context I don't know if its related but methods doesn't seems to be exported here. https://github.com/storybookjs/storybook/blob/next/addons/docs/src/frameworks/web-components/custom-elements.ts#L137