mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-09-02 10:32:41 +02:00
refactor(storybook): storybook enhancement and cleanup
refactored the storybook codebase for all components re #381
This commit is contained in:
20
story/inputs/input.template.js
Normal file
20
story/inputs/input.template.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { select } from '@storybook/addon-knobs';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import sharedOptions from '../_helpers/shared';
|
||||
|
||||
export default () => {
|
||||
const inputOptions = select('Input Classes', {
|
||||
default: '',
|
||||
...sharedOptions,
|
||||
}, '');
|
||||
|
||||
const inputClasses = classNames(
|
||||
'nes-input',
|
||||
inputOptions,
|
||||
);
|
||||
|
||||
return `
|
||||
<input type="text" id="name_field" class="${inputClasses}" placeholder="NES.css">
|
||||
`;
|
||||
};
|
Reference in New Issue
Block a user