You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coptic: Any interest in improving the controls? For example, size here has three options, so a radio is a little nicer than having to type in something IMO. If there’s 3+ it could default to a select maybe?
bennyp: This could maybe be automated from the type field in a custom elements manifest, however, we'd have to assume the type text is typescript in order to parse the union, where the manifest scema makes no such assumption
coptic: Ya that’s what I was playing around with. That’s a good point though not assuming TS. FWIW, stencils doc schema and generator is nice in that it does parse any union into a values array.
tl;dr: tools can't know for certain what kind of string the type text is. If we added a hint (per file, or per type), they could parse the type to do things like generate radio buttons for demos
This would be great. Unfortunately, parsing TypeScript values and adding them to the manifest can be tricky. I created this plugin and used it with my Storybook helpers to help get the experience you are looking for.
tl;dr: tools can't know for certain what kind of string the type text is. If we added a hint (per file, or per type), they could parse the type to do things like generate radio buttons for demos
per type:
per file
The text was updated successfully, but these errors were encountered: