From ab611bdc6accb94a3a0a73eef149545de58ea157 Mon Sep 17 00:00:00 2001 From: Evgeniy Zaitsev Date: Tue, 30 May 2017 17:10:08 +0300 Subject: [PATCH 1/4] add new options to info addon --- addons/info/.storybook/addons.js | 1 - addons/info/example/story.js | 67 ++++++++++++++++++++------- addons/info/package.json | 3 +- addons/info/src/components/PropVal.js | 31 ++++++++----- addons/info/src/components/Props.js | 7 ++- addons/info/src/components/Story.js | 23 ++++++++- addons/info/src/index.js | 8 ++++ 7 files changed, 106 insertions(+), 34 deletions(-) diff --git a/addons/info/.storybook/addons.js b/addons/info/.storybook/addons.js index 0d8df7d5b1c4..5dea101a7c9a 100644 --- a/addons/info/.storybook/addons.js +++ b/addons/info/.storybook/addons.js @@ -1,2 +1 @@ import '@storybook/addon-actions/register'; -import 'react-storybook-addon-backgrounds/register'; diff --git a/addons/info/example/story.js b/addons/info/example/story.js index ca357f89a9db..28368fd84a4a 100644 --- a/addons/info/example/story.js +++ b/addons/info/example/story.js @@ -3,7 +3,6 @@ import Button from './Button'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import backgrounds from 'react-storybook-addon-backgrounds'; storiesOf( 'Button' @@ -137,23 +136,57 @@ storiesOf('Button').addWithInfo( { inline: true } ); -storiesOf('Button') - .addDecorator(backgrounds([{ name: 'dark', value: '#333', default: true }])) - .addWithInfo( - 'with custom styles', - ` +storiesOf('Button').addWithInfo( + 'simple usage (maxPropsInLine === 1)', + ` + This is the basic usage with the button with providing a label to show the text. + `, + () =>