1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-09-02 02:22:37 +02:00
Files
nes.css/story/containers/containers.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

32 lines
793 B
JavaScript

import { select, boolean } from '@storybook/addon-knobs';
import classNames from 'classnames';
export default () => {
const isDark = boolean('is-dark', false);
const isRounded = boolean('is-rounded', false);
const withTitle = boolean('with-title', false);
const containerAlignment = select('Alignment', {
default: '',
'is-centered': 'is-centered',
'is-right': 'is-right',
}, '');
const containerClasses = classNames(
'nes-container',
containerAlignment,
{
'is-dark': isDark,
'is-rounded': isRounded,
'with-title': withTitle,
},
);
return `
<div class="${containerClasses}">
${withTitle ? '<p class="title">Container</p>' : ''}
<p>Good morning. Thou hast had a good night's sleep, I hope.</p>
</div>
`;
};