wix-style-react
Version:
wix-style-react
40 lines (36 loc) • 1.24 kB
JavaScript
import React from 'react';
import { storiesOf } from '@storybook/react';
import { getTestStoryKind } from '../storiesHierarchy';
import { storySettings } from './storySettings';
import { RTLWrapper } from '../utils';
import MultiSelect from '../../src/MultiSelect';
import ExampleReorderable from './ExampleReorderable';
var kind = getTestStoryKind({
category: storySettings.category,
storyName: storySettings.storyName
});
var MultiSelectTests = storiesOf(kind, module);
MultiSelectTests.add('1. With maxNumRows', function () {
return React.createElement(
RTLWrapper,
null,
React.createElement(
'div',
{ style: { width: '400px' } },
'numOfRows=2:',
React.createElement(MultiSelect, {
dataHook: 'multi-select-limited',
tags: [{ id: '1', label: 'aaaaaaaaaaaa' }, { id: '2', label: 'aaaaaaaaaaaa' }, { id: '3', label: 'aaaaaaaaaaaa' }, { id: '4', label: 'aaaaaaaaaaaa' }, { id: '5', label: 'aaaaaaaaaaaa' }, { id: '6', label: 'aaaaaaaaaaaa' }],
maxNumRows: 2,
upgrade: true
})
)
);
});
MultiSelectTests.add('2. Reorderable', function () {
return React.createElement(
RTLWrapper,
null,
React.createElement(ExampleReorderable, null)
);
});