mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:41:17 +08:00
Added background addon support
This commit is contained in:
parent
306b580080
commit
5f64ea371b
@ -4,7 +4,7 @@
|
||||
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|
||||
|[a11y](addons/a11y) |+| |+|+|+|+|+|+| |
|
||||
|[actions](addons/actions) |+|+|+|+|+|+|+|+| |
|
||||
|[backgrounds](addons/backgrounds) |+| |+|+|+|+|+|+| |
|
||||
|[backgrounds](addons/backgrounds) |+| |+|+|+|+|+|+|+|
|
||||
|[centered](addons/centered) |+| |+|+| |+|+| |+|
|
||||
|[events](addons/events) |+| |+|+|+|+|+|+| |
|
||||
|[graphql](addons/graphql) |+| | | | | | | | |
|
||||
|
1
addons/backgrounds/svelte.js
Normal file
1
addons/backgrounds/svelte.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./dist/deprecated');
|
@ -0,0 +1,15 @@
|
||||
import { storiesOf } from '@storybook/svelte';
|
||||
import { withBackgrounds } from '@storybook/addon-backgrounds';
|
||||
|
||||
import ButtonView from './views/ButtonView.svelte';
|
||||
|
||||
storiesOf('Addon|Backgrounds', module)
|
||||
.addDecorator(
|
||||
withBackgrounds([
|
||||
{ name: 'twitter', value: '#00aced' },
|
||||
{ name: 'facebook', value: '#3b5998', default: true },
|
||||
])
|
||||
)
|
||||
.add('story 1', () => ({
|
||||
Component: ButtonView,
|
||||
}));
|
Loading…
x
Reference in New Issue
Block a user