modernweb-dev / storybook-prebuilt

Storybook prebuilt to work with native es modules
MIT License
37 stars 9 forks source link

Does this support argType inference via custom-elements.json? #51

Closed jdelight closed 3 years ago

jdelight commented 3 years ago

Hey folks, just want to determine if the ability to read/configure Storybook controls via the custom-elements.json manifest is supported in this prebuilt distribution of storybook.

I'm wondering if it's a case of this repo being slightly behind the main repo release and therefore it's not currently available here or whether it is and I just have a config issue. If it's possible to confirm and any indication when it might be available would be great - thanks.

Westbrook commented 3 years ago

The configuration to prepare for this would look something like:

import {
    setCustomElements,
} from '@web/storybook-prebuilt/web-components.js';
import customElemenents from '../custom-elements.json';

// ...

setCustomElements(customElemenents);
jdelight commented 3 years ago

Awesome, thanks @Westbrook

P.s. I recently spent some time digging through the various Spectrum sites and repos and learned a ton. Great work! We're trying to improve our design system atm with a focus on dev x and documentation.

Westbrook commented 3 years ago

I certainly can't take all the credit, but very glad to hear the work we're doing (here and with Spectrum) is proving useful to you and your team! Hopefully, when you get further down the line, you'll be able to share something of this work here or make a PR to https://open-wc.org/guides/community/component-libraries/ so that the next team can learn from you as well.

I'll close this issue for now, but if you have any other issues with this config, feel free to reopen or create new issues with more focused questions. Cheers!