1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-01-17 13:48:13 +01:00
nes.css/story/buttons.stories.js
BcRikko 6c05cf26cb docs(storybook): rename docs to story
i'd like to use docs as demo site directory
2019-02-20 19:46:19 +09:00

20 lines
641 B
JavaScript

import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
import { // eslint-disable-line import/no-extraneous-dependencies
withKnobs, radios,
} from '@storybook/addon-knobs';
const stories = storiesOf('Buttons', module);
stories.addDecorator(withKnobs);
stories.add('button', () => {
const extraClass = radios('class', {
default: '',
'is-primary': 'is-primary',
'is-success': 'is-success',
'is-warning': 'is-warning',
'is-error': 'is-error',
'is-disabled': 'is-disabled',
}, '');
return `<button type="button" class="nes-btn ${extraClass}">Normal</button>`;
});