mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-01-17 13:48:13 +01:00
6c05cf26cb
i'd like to use docs as demo site directory
20 lines
727 B
JavaScript
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>`;
|
|
});
|