Skip to content

Commit

Permalink
Remove @storybook/addon-info
Browse files Browse the repository at this point in the history
  • Loading branch information
toomuchdesign committed May 18, 2020
1 parent d7b241f commit 2477f42
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 200 deletions.
1 change: 0 additions & 1 deletion .storybook/addons.js

This file was deleted.

53 changes: 19 additions & 34 deletions .storybook/config.js
@@ -1,29 +1,24 @@
import React from 'react';
import { addDecorator, addParameters } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { addDecorator } from '@storybook/react';
import { addons } from '@storybook/addons';

addParameters({
options: {
theme: {
brandTitle: 'React minimal pie chart',
brandUrl: 'https://github.com/toomuchdesign/react-minimal-pie-chart',
},
showPanel: false,
panelPosition: 'right',
addons.setConfig({
theme: {
brandTitle: 'React minimal pie chart',
brandUrl: 'https://github.com/toomuchdesign/react-minimal-pie-chart',
},
showPanel: false,
panelPosition: 'right',
});

addDecorator(
withInfo({
header: false,
inline: false,
propTables: false,
maxPropsIntoLine: 1,
inline: true,
})
);
addDecorator((story) => (
<div>
<div
style={{
maxWidth: '400px',
margin: '0 auto',
padding: '50px',
}}
>
{story()}
<p
style={{
Expand All @@ -33,21 +28,11 @@ addDecorator((story) => (
fontFamily: 'Helvetica Neue,Helvetica,Arial,sans-serif',
}}
>
Find the original source of the examples{' '}
<a href="https://github.com/toomuchdesign/react-minimal-pie-chart/blob/master/stories/index.js">
here.
Read the source of this demo{' '}
<a href="https://github.com/toomuchdesign/react-minimal-pie-chart/blob/master/stories/index.tsx">
here
</a>
.
</p>
</div>
));
addDecorator((story) => (
<div
style={{
maxWidth: '400px',
margin: '0 auto',
padding: '50px',
}}
>
{story()}
</div>
));
1 change: 1 addition & 0 deletions .storybook/main.js
@@ -1,3 +1,4 @@
module.exports = {
stories: ['../stories/index.tsx'],
addons: ['@storybook/addon-actions/register'],
};

0 comments on commit 2477f42

Please sign in to comment.