web: components: Moved story for Textarea + added base test

This commit is contained in:
Alexey Safronov 2019-09-08 19:14:13 +03:00
parent dbaad547d9
commit 4af39c6b49
3 changed files with 15 additions and 2 deletions

View File

@ -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

View File

@ -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';

View File

@ -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();
});
});