1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-31 01:39:50 +02:00

feat(textarea): add textarea to storybook

This commit is contained in:
Igor Guastalla de Lima
2018-12-09 13:04:53 -02:00
parent 2297d78c37
commit becdefa037

18
docs/textarea.stories.js Normal file
View 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">`;
});