-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
how do you enable withKnobs as a global? #1821
Comments
Do you have these files configured:
import { addDecorator } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
addDecorator(withKnobs);
import '@storybook/addon-knobs/register' |
Not working for me either, I see the knobs pane but nothing in it. Have the |
Can you please share an example of the story file where you want to use knobs ? |
Pretty simple stuff: import React from 'react';
import { storiesOf } from '@storybook/react';
import Avatar from './index';
const stories = storiesOf('Avatar', module);
stories.add('coreylight@gmail.com', () => {
return <Avatar email="coreylight@gmail.com" />;
}); |
Perhaps I'm assuming that the decorator will simply enable all component props as knobs? If this isn't true, is it something that can be accomplished? |
There is a smart knobs addon that does this: https://github.com/storybooks/addon-smart-knobs |
Great! Thanks @igor-dv, I'll look into it. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
I can't seem to get this to work globally?
The text was updated successfully, but these errors were encountered: