mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 10:42:12 +00:00
Addon added to storybook
This commit is contained in:
parent
8255c7fd20
commit
1ef7244a39
3 changed files with 33 additions and 2 deletions
|
|
@ -1,6 +1,20 @@
|
|||
const React = require('react');
|
||||
const { storiesOf } = require('@storybook/react');
|
||||
const { action } = require('@storybook/addon-actions');
|
||||
const Addon = require('stremio/routes/Addons/Addon');
|
||||
const styles = require('./styles');
|
||||
|
||||
storiesOf('Addon', module).add('Installed', () => (
|
||||
<div>Installed addon</div>
|
||||
<Addon
|
||||
className={styles['installed-addon-container']}
|
||||
id={'addon-id'}
|
||||
name={'Demo name'}
|
||||
logo={'/images/intro_background.jpg'}
|
||||
description={'Demo description'}
|
||||
types={['Demo type']}
|
||||
version={'1.0.0'}
|
||||
transportUrl={'Demo url'}
|
||||
installed={true}
|
||||
toggle={action('Demo item uninstall button clicked')}
|
||||
/>
|
||||
));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,20 @@
|
|||
const React = require('react');
|
||||
const { storiesOf } = require('@storybook/react');
|
||||
const { action } = require('@storybook/addon-actions');
|
||||
const Addon = require('stremio/routes/Addons/Addon');
|
||||
const styles = require('./styles');
|
||||
|
||||
storiesOf('Addon', module).add('NotInstalled', () => (
|
||||
<div>Not installed addon</div>
|
||||
<Addon
|
||||
className={styles['not-installed-addon-container']}
|
||||
id={'addon-id'}
|
||||
name={'Demo name'}
|
||||
logo={'/images/intro_background.jpg'}
|
||||
description={'Demo description'}
|
||||
types={['Demo type']}
|
||||
version={'1.0.0'}
|
||||
transportUrl={'Demo url'}
|
||||
installed={false}
|
||||
toggle={action('Demo item install button clicked')}
|
||||
/>
|
||||
));
|
||||
|
|
|
|||
3
storybook/stories/Addon/styles.less
Normal file
3
storybook/stories/Addon/styles.less
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.installed-addon-container, .not-installed-addon-container {
|
||||
margin: 10px;
|
||||
}
|
||||
Loading…
Reference in a new issue