question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature proposal] Integrate with the knobs add-on

See original GitHub issue

The Knobs addon for Storybook allows you to change the state of a component in the UI, rather than having to build a separate story for each state.

Are there any plans of integrating this library with knobs, so that one could screenshot multiple knob states? Off the top of my head, something like:

import { text } from '@storybook/addon-knobs/react'

storiesOf('submit button', module)
  .addDecorator(withScreenshot({
    knobs: {
      'Button label': [
        'Submit',
        'Go',
        'Search',
      ],
    },
  }))
  .add('submit button', () => (
    <input type="submit" value={text('Button label', 'Submit')} />
  ))

Thoughts? Without this feature, I have to convert all my knobs to discrete stories so that they can be screenshotted individually.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

2reactions
wadackelcommented, Mar 21, 2018

Hi @jessepinho, Thank you for wonderful proposal ❤️

I think the feature you suggested is very useful. I’d like to incorporate the implementation in the next version, so I’m glad if you can wait for a while.

Thanks!!

1reaction
jessepinhocommented, Apr 4, 2018

@tsuyoshiwada ahh so cool! Thanks for doing this so quickly! Will take a look as soon as I can 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Knobs Addon | Storybook: Frontend workshop for UI ...
Storybook Addon Knobs allow you to edit props dynamically using the Storybook UI. You can also use Knobs as a dynamic variable inside...
Read more >
"Knobs" Coming/Feature Request? · Issue #327
I'm wondering if it can be done in a way that https://github.com/storybooks/storybook-addon-knobs can be reused.
Read more >
React Storybook addon Knobs for editing Angular props
Storybook Addon Knobs allow you to edit React props dynamically using the Storybook UI. You can also use Knobs as a dynamic variable...
Read more >
Wiki
Configure a button or link to target the work package creation screen in the current project. You can preselect a work package type...
Read more >
Product Principles | GitLab
This means, with few exceptions, features should simply work on GitLab.com and ... It's a natural reaction to propose a big change to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found