Skip to content

Instantly share code, notes, and snippets.

@yogain123
Last active February 24, 2024 13:40
Show Gist options
  • Save yogain123/9fc02c012991b5709045c821a13fb1dc to your computer and use it in GitHub Desktop.
Save yogain123/9fc02c012991b5709045c821a13fb1dc to your computer and use it in GitHub Desktop.
Storybook
@yogain123
Copy link
Author

Decorators in Storybook

lets say you want to center all stories to center, then what you will do, this->

Screen Shot 2022-11-12 at 2 40 20 PM

but instread you can use decoratos to give to all stories, like beloew

Screen Shot 2022-11-12 at 2 41 19 PM

Or you can also add global Decorator

Screen Shot 2022-11-12 at 2 42 05 PM

@yogain123
Copy link
Author

Add ons in Storybook

Screen Shot 2022-11-12 at 2 45 04 PM


Screen Shot 2022-11-12 at 2 45 11 PM


Screen Shot 2022-11-12 at 2 46 24 PM


Screen Shot 2022-11-12 at 2 46 30 PM

@yogain123
Copy link
Author

Building Storybook

run the build command, it will generstor static web app, put/deploy it in github pages

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