mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-09-03 02:53:31 +02:00
feat(textarea): add textarea to storybook
This commit is contained in:
18
docs/textarea.stories.js
Normal file
18
docs/textarea.stories.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
|
||||||
|
import { // eslint-disable-line import/no-extraneous-dependencies
|
||||||
|
withKnobs, radios,
|
||||||
|
} from '@storybook/addon-knobs';
|
||||||
|
|
||||||
|
const stories = storiesOf('Textareas', module);
|
||||||
|
stories.addDecorator(withKnobs);
|
||||||
|
|
||||||
|
stories.add('textarea', () => {
|
||||||
|
const selectedClass = radios('class', {
|
||||||
|
default: '',
|
||||||
|
'is-success': 'is-success',
|
||||||
|
'is-warning': 'is-warning',
|
||||||
|
'is-error': 'is-error',
|
||||||
|
}, '');
|
||||||
|
|
||||||
|
return `<textarea id="textarea_field" class="textarea ${selectedClass}" placeholder="NES.css">`;
|
||||||
|
});
|
Reference in New Issue
Block a user