1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-09-09 05:40:51 +02:00

refactor(storybook): storybook enhancement and cleanup

refactored the storybook codebase for all components

re #381
This commit is contained in:
Kaylum Lally
2019-12-14 15:21:15 +00:00
parent 08cbd6e51e
commit 2e06165882
49 changed files with 643 additions and 404 deletions

View File

@@ -0,0 +1,41 @@
import { boolean } from '@storybook/addon-knobs';
import classNames from 'classnames';
export default () => {
const isBorderd = boolean('is-bordered', true);
const isCentered = boolean('is-centered', false);
const isDark = boolean('is-dark', false);
const tableClasses = classNames(
'nes-table',
{
'is-bordered': isBorderd,
'is-centered': isCentered,
'is-dark': isDark,
},
);
return `
<table class="nes-table ${tableClasses}" style="margin:15px 4px 5px 4px">
<thead>
<tr>
<th>Table.is-dark</th>
<th>Table.is-bordered</th>
<th>Table.is-centered</th>
</tr>
</thead>
<tbody>
<tr>
<td>Thou hast had a good morning</td>
<td>Thou hast had a good afternoon</td>
<td>Thou hast had a good night</td>
</tr>
<tr>
<td>Thou hast had a good morning</td>
<td>Thou hast had a good afternoon</td>
<td>Thou hast had a good night</td>
</tr>
</tbody>
</table>
`;
};