Skip to content

Commit

Permalink
feat(textarea): add textarea to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
guastallaigor committed Dec 9, 2018
1 parent 2297d78 commit becdefa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/textarea.stories.js
Original file line number Diff line number Diff line change
@@ -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">`;
});

0 comments on commit becdefa

Please sign in to comment.