web: components: Moved story for RowContainer + added base test and README.md

This commit is contained in:
Alexey Safronov 2019-09-08 18:28:32 +03:00
parent 33894f98f3
commit 153c0975cb
3 changed files with 51 additions and 2 deletions

View File

@ -0,0 +1,26 @@
# RowContainer
## Usage
```js
import { RowContainer } from 'asc-web-components';
```
#### Description
Container for rows
#### Usage
```js
<RowContainer manualHeight='500px'>
{children}
</RowContainer>
```
#### Properties
| Props | Type | Required | Values | Default | Description |
| ---------------- | ---------- | :------: | ------ | ------- | --------------------------------------------------------- |
| `manualHeight` | `string` | - | | - | |
| `itemHeight` | `number` | - | | 50 | |

View File

@ -1,7 +1,12 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import Section from '../../.storybook/decorators/section';
import { RowContainer, Row, RowContent, Avatar, Link, Icons } from 'asc-web-components';
import Section from '../../../.storybook/decorators/section';
import RowContainer from '.';
import Row from '../row';
import RowContent from '../row-content';
import Avatar from '../avatar';
import Link from '../combobox';
import { Icons } from '../icons';
const getRndString = (n) => Math.random().toString(36).substring(2, (n + 2));
const getRndNumber = (a, b) => Math.floor(Math.random() * (b - a)) + a;

View File

@ -0,0 +1,18 @@
import React from 'react';
import { mount } from 'enzyme';
import Row from '.';
describe('<Row />', () => {
it('renders without error', () => {
const wrapper = mount(
<Row
checked={false}
contextOptions={[]}
>
<span>Some text</span>
</Row>
);
expect(wrapper).toExist();
});
});