If you group any Stories (i.e. Group|Folder/Story) in your Storybook, Stories without a defined group will now appear in an automatically-generated "Others" group in the sidebar.
The most basic Story
import React from 'react';
import { storiesOf } from '@storybook/react';
import MyComponent from './MyComponent';
storiesOf('Group|Folder/MyComponent', module)
.add('default', () => (
<MyComponent />
));
You can have multiple storiesOf blocks if it helps you stay organized; any blocks that share a name string will be combined in the sidebar as a single collection of Stories.
Using a visual wrapper component
Good for components that stretch too wide without a container. Using addDecorator, all of the Stories will be children of the wrapper component.
The Knobs addon lets us change the props passed into our component inside Storybook’s UI. It’s super helpful to quickly test out component appearance against different values.