Apply Style to a React StoryBook with the Info addon to Turn Stories into Documentation

Shawn Wang
InstructorShawn Wang

Share this video with your friends

Send Tweet

Storybook is a UI component development environment for React, Vue, and Angular. With that, you can develop UI components without running your app.

Here I show how to set up the Info addon to make your Storybook stories into interactive documentation, including the best way to style the Info addon to your heart's desires.

Jesse Gonzalez
Jesse Gonzalez
~ 2 years ago

adding withInfo() and by extension wInfo() to addWithJSX(), the JSX addon shows the Story component. You can pass {skip: 1} to addwithJSX() to suppress.

Steve
Steve
~ 2 years ago

Hmm, I just looked up the docs and tried the skip option and i​ couldn't see any difference!?!

Terry DI LUZIO
Terry DI LUZIO
~ 2 years ago

Just saw that withInfo is deprecated. We now have to use addDecorator(withInfo); // Globally in your .storybook/config.js.

See at https://www.npmjs.com/package/@storybook/addon-info

Dale Francis
Dale Francis
~ 2 years ago

Haha I love that you completely skip over how the withInfo completely destroys the work done with addWithJSX, you may want to update this video and show some more info about how to add it globally now that it is deprecated and how to ensure it doesn't have issues with other things

Vitalie Andries
Vitalie Andries
~ 2 years ago

Haha I love that you completely skip over how the withInfo completely destroys the work done with addWithJSX, you may want to update this video and show some more info about how to add it globally now that it is deprecated and how to ensure it doesn't have issues with other things +1

Nacho López
Nacho López
~ 2 years ago

Haha I love that you completely skip over how the withInfo completely destroys the work done with addWithJSX, you may want to update this video and show some more info about how to add it globally now that it is deprecated and how to ensure it doesn't have issues with other things +1

BrightPixels
BrightPixels
~ 2 years ago

I am getting Uknown tags around my component when view the withinfo panel. Why? See screenshot please: https://imgur.com/bARJuq6