mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-31 09:41:47 +02:00
29 lines
590 B
JavaScript
29 lines
590 B
JavaScript
import { select } from '@storybook/addon-knobs';
|
|
import classNames from 'classnames';
|
|
|
|
import sharedOptions from '../_helpers/shared';
|
|
|
|
export default () => {
|
|
const disabled = 'is-disabled';
|
|
const inputOptions = select('Input Classes', {
|
|
default: '',
|
|
...sharedOptions,
|
|
[disabled]: disabled,
|
|
}, '');
|
|
|
|
const inputClasses = classNames(
|
|
'nes-input',
|
|
inputOptions,
|
|
);
|
|
|
|
return `
|
|
<input
|
|
type="text"
|
|
id="name_field"
|
|
${inputOptions.includes(disabled) && 'disabled'}
|
|
class="${inputClasses}"
|
|
placeholder="NES.css"
|
|
/>
|
|
`;
|
|
};
|