-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: @values in prop jsdoc do not populate controls through vue-docgen-api #28558
Comments
** Disclaimer** This information might be inaccurate, due to it being generated automatically
References/code/renderers/vue3/template/stories_vue3-vite-default-ts/component-meta/ReferenceTypeProps.stories.ts
|
@larsrickert @chakAs3 @kasperpeulen is this something you can help with? |
@thedamon, we've never been able to get |
@chakAs3 Ah k. this may explain it for the most part then. My reference is I know For |
@thedamon I'd say auto controls without TypeScript is not possible since in Vue (independent of Storybook), vanilla JavaScript is limited to the Even if you add JSDoc tags for the enum values, if you hover over I'd suggest to either use TypeScript or you can manually define the args like this which should be equivalent effort because you can remove the const meta = {
title: 'Example/Button',
component: Button,
tags: ['autodocs'],
argTypes: {
size: { control: 'select', options: ['small', 'medium', 'large'] },
},
}; |
Describe the bug
I expect that providing
@values
ortype
to a prop should result in an enum/select style, as that's the functionality ofvue-docgen-api
, but I'm not seeing that behaviour.Reproduction link
https://stackblitz.com/edit/github-hfdqmp?file=src%2Fstories%2FButton.stories.js,src%2Fstories%2FButton.vue&preset=node
Reproduction steps
jsdoc
comment:@values 'small', 'medium', 'large'
System
Additional context
Also note the vue-component-meta is not working in this way as expected either, as demonstrated here: https://stackblitz.com/edit/github-akbacb?file=src%2Fstories%2FButton.stories.ts,src%2Fstories%2FButton.vue,.storybook%2Fmain.ts&preset=node
The text was updated successfully, but these errors were encountered: