1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-09-03 02:53:31 +02:00
Files
nes.css/story/dialogs/dialogs.template.js
Kaylum Lally 2e06165882 refactor(storybook): storybook enhancement and cleanup
refactored the storybook codebase for all components

re #381
2019-12-14 15:21:15 +00:00

24 lines
542 B
JavaScript

import { boolean } from '@storybook/addon-knobs';
import classNames from 'classnames';
export default () => {
const isOpen = boolean('Open', true) ? 'open' : '';
const isRounded = boolean('is-rounded', false);
const isDark = boolean('is-dark', false);
const dialogClasses = classNames(
'nes-dialog',
{
'is-rounded': isRounded,
'is-dark': isDark,
},
);
return `
<dialog class="${dialogClasses}" ${isOpen}>
<p class="title">Dialog</p>
<p>Alert: this is a dialog.</p>
</dialog>
`;
};