2018-12-04 17:13:03 +02:00
|
|
|
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
|
2018-12-04 19:30:42 +02:00
|
|
|
import { // eslint-disable-line import/no-extraneous-dependencies
|
2018-12-05 08:41:46 +02:00
|
|
|
withKnobs, radios,
|
2018-12-04 19:30:42 +02:00
|
|
|
} from '@storybook/addon-knobs';
|
2018-12-04 16:40:25 +02:00
|
|
|
|
2018-12-04 19:30:42 +02:00
|
|
|
const stories = storiesOf('Buttons', module);
|
|
|
|
stories.addDecorator(withKnobs);
|
|
|
|
|
|
|
|
stories.add('button', () => {
|
2018-12-05 08:41:46 +02:00
|
|
|
const extraClass = radios('class', {
|
|
|
|
default: '',
|
|
|
|
'is-primary': 'is-primary',
|
|
|
|
'is-success': 'is-success',
|
|
|
|
'is-warning': 'is-warning',
|
|
|
|
'is-error': 'is-error',
|
2018-12-05 22:47:14 -02:00
|
|
|
'is-disabled': 'is-disabled',
|
2018-12-05 08:41:46 +02:00
|
|
|
}, '');
|
2018-12-10 17:55:41 +09:00
|
|
|
return `<button type="button" class="nes-btn ${extraClass}">Normal</button>`;
|
2018-12-04 19:30:42 +02:00
|
|
|
});
|