-
Notifications
You must be signed in to change notification settings - Fork 36
Groups of knobs to organize multiple components on the same page #75
Conversation
About this:
Maybe we could read a props on children components (like |
Seems like I'm having another issue when using addon-docs. If component is not wrapped, it doesn't receive props properly in the doc page. const Wrapper = (props) => <MyComponent {...props} />
export const Story = () => <Wrapper foo="bar" /> I just don't understand why it does have this behavior. |
Could you merge in the base branch please? |
I just did it @ndelangen but maybe it'll be necessary to check this : #75 (comment) and to fix this : #75 (comment) ? |
That's strange, that behavior should just work, I think you're using CSF there? |
Yes I am. I just wanted to start with a basic setup before looking to make it works with MDX Syntax (because I'm using Typescript). Maybe another PR to add more documentation on how to setup Storybook docs with Typescript and MDX here storybook docs could be cool ? |
@shilman is working on a replacement for knobs that has this auto-feature built-in btw. Any PR improving the docs would be welcome! |
Ok, that's cool! Maybe you have a date for a release? 🙃 |
6.0.0 is scheduled for release next month or so. It depends on how many bugs we find during prereleases. |
Hi, folks! Can you talk about the status of this PR? I using 6.0.2 but I have the same problems with my multiple components. |
Just a note that Storybook v6 and I am not a maintainer, but I'd consider this addon effectively dead since Controls have resolved all open issues I had with Smart Knobs (including this one) and leapfrogged it in terms of functionality. |
I agree with @chriszarate, this PR is clearly useless for v6 because this addon is useless for v6. @nikshevchenko I don't think having multiple components in the same story is a good practice. Is your code opensource or could you setup a bug repro? Can't help without more informations. @ndelangen is this repo going to be archived or do you want to keep it active? Maybe this question should be in another issue? |
@bastienrobert I think it's best archived, I'll ask @shilman |
If the same component is several times in the same story, groups are automatically generated based on the children's index in order to put them in tabs and prevent conflicts between props.
Also, it fix the documentation page issue in storybook/addon-knobs.
Maybe it would be possible to customize these names to make groups more verbose.
Fix. #71