web: components: Moved story for RowContainer + added base test and README.md
This commit is contained in:
parent
33894f98f3
commit
153c0975cb
@ -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 | |
|
@ -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;
|
@ -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();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user