web: components: Moved story for Textarea + added base test
This commit is contained in:
parent
dbaad547d9
commit
4af39c6b49
@ -13,7 +13,7 @@ Textarea is used for displaying custom textarea
|
||||
#### Usage
|
||||
|
||||
```js
|
||||
<Textarea placeholder="Add comment" onChange={event => alert(event.target.value) value='value' />
|
||||
<Textarea placeholder="Add comment" onChange={event => alert(event.target.value)} value='value' />
|
||||
```
|
||||
|
||||
#### Properties
|
@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
|
||||
import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';
|
||||
import withReadme from 'storybook-readme/with-readme';
|
||||
import Readme from './README.md';
|
||||
import { Textarea } from 'asc-web-components';
|
||||
import Textarea from '.';
|
||||
import Section from '../../../.storybook/decorators/section';
|
||||
import { StringValue } from 'react-values';
|
||||
import { action } from '@storybook/addon-actions';
|
@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import Textarea from '.';
|
||||
|
||||
describe('<Textarea />', () => {
|
||||
it('renders without error', () => {
|
||||
const wrapper = mount(
|
||||
<Textarea placeholder="Add comment" onChange={event => alert(event.target.value)} value='value' />
|
||||
);
|
||||
|
||||
expect(wrapper).toExist();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user