#Documenting Web Components With Storybook
1 messages · Page 1 of 1 (latest)
Hey @tender pebble , great write up! Is it ok to circulate this on social networks and slacks?
Found you! 🙂 I'll do that when I'm at work!
@tender pebble have you considered useing argsEnhancers and argTypesEnhancers to automatically inject these based on the component names? I've had reasonable success doing this, though it's a poorly documented part of the preview api
I've not heard about this before so no
We do need to define the tag name regardless though, so the boiletplate is super minimal
for sure - I'm just incredibly lazy, and will go to great efforts to be so (:
Great write up though, one I'd wish I'd read a few years ago. Applicable equally to non-wc; I've found the built in docgen in React to be painfully slow.
Yeah, I’ll try to find time to put something together tomorrow.
I can’t remember how I discovered it - I’d actually raised a discussion on github for adding an api exactly like it without realising it was there already, and used in react to sniff the byteweaved output of the docket plugins
The hard part, as Jives notes, was working out the right structure for the arg types 🫠
I look forward to seeing it! Don't let that hidden gem go to waste!