1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-01-17 13:48:13 +01:00
nes.css/story/dialogs.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
727 B
JavaScript

import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
import { // eslint-disable-line import/no-extraneous-dependencies
withKnobs, boolean,
} from '@storybook/addon-knobs';
const stories = storiesOf('Dialogs', module);
stories.addDecorator(withKnobs);
stories.add('dialog', () => {
const open = boolean('open', true) ? 'open' : '';
const isRounded = boolean('is-rounded', false) ? 'is-rounded' : '';
const isDark = boolean('is-dark', false) ? 'is-dark' : '';
const selectedClasses = [isRounded, isDark];
return `<dialog class="nes-dialog ${selectedClasses.join(' ')}" ${open}>
<p class="title">Dialog</p>
<p>Alert: this is a dialog.</p>
</div>`;
});