Skip to content
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]: props containing 'on' are improperly rendered in "Show code" #25143

Closed
ChristopheFuzier opened this issue Dec 7, 2023 · 1 comment · Fixed by #25219
Closed

[Bug]: props containing 'on' are improperly rendered in "Show code" #25143

ChristopheFuzier opened this issue Dec 7, 2023 · 1 comment · Fixed by #25219

Comments

@ChristopheFuzier
Copy link

Describe the bug

In the "Show code" section, any prop containing "on" is rendered as a callback. The test should be whether the name starts with "on" rather than whether it contains "on".

To Reproduce

https://stackblitz.com/edit/github-j6h4hd?file=src%2Fstories%2FButton.vue,src%2Fstories%2FButton.stories.js&preset=node

  • Go to Button / Docs in the storybook
  • Click "Show code"
  • Edit the "icon" prop

-> The generated prop in "Show code" is icon="()=>({})" whatever the value you set.

System

System:
    OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn <----- active
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Browsers:
    Chrome: 119.0.6045.199
  npmPackages:
    @storybook/addon-essentials: ^7.6.3 => 7.6.3 
    @storybook/addon-interactions: ^7.6.3 => 7.6.3 
    @storybook/addon-links: ^7.6.3 => 7.6.3 
    @storybook/blocks: ^7.6.3 => 7.6.3 
    @storybook/test: ^7.6.3 => 7.6.3 
    @storybook/vue3: ^7.6.3 => 7.6.3 
    @storybook/vue3-vite: ^7.6.3 => 7.6.3 
    storybook: ^7.6.3 => 7.6.3

Additional context

No response

@Tap-Kim
Copy link
Contributor

Tap-Kim commented Dec 13, 2023

May I handle this issue? please assign to me~ I'll create PR soon!👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants