mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-01 05:05:25 +08:00
18 lines
557 B
JavaScript
18 lines
557 B
JavaScript
import React from 'react';
|
|
import { storiesOf } from '@storybook/react';
|
|
|
|
import backgrounds from '@storybook/addon-backgrounds';
|
|
import BaseButton from '../components/BaseButton';
|
|
|
|
storiesOf('Addons|Addon Backgrounds', module)
|
|
.addDecorator(
|
|
backgrounds([
|
|
{ name: 'twitter', value: '#00aced' },
|
|
{ name: 'facebook', value: '#3b5998', default: true },
|
|
])
|
|
)
|
|
.add('story 1', () => (
|
|
<BaseButton label="You should be able to switch backgrounds for this story" />
|
|
))
|
|
.add('story 2', () => <BaseButton label="This one too!" />);
|