wix-style-react
Version:
wix-style-react
61 lines (55 loc) • 2.1 kB
JavaScript
import React from 'react';
import { storiesOf } from '@storybook/react';
import Markdown from 'wix-storybook-utils/Markdown';
import TabbedView from 'wix-storybook-utils/TabbedView';
import CodeExample from 'wix-storybook-utils/CodeExample';
import Readme from '../../src/InputWithOptions/README.md';
import ReadmeTestkit from '../../src/InputWithOptions/README.TESTKIT.md';
import ExampleStandard from './ExampleStandard';
import ExampleStandardRaw from '!raw-loader!./ExampleStandard';
import ExampleDropdownSize from './ExampleDropdownSize';
import ExampleDropdownSizeRaw from '!raw-loader!./ExampleDropdownSize';
import ExampleControlled from './ExampleControlled';
import ExampleControlledRaw from '!raw-loader!./ExampleControlled';
import ExampleNoDropdownIfEmptyInput from './ExampleNoDropdownIfEmptyInput';
import ExampleNoDropdownIfEmptyInputRaw from '!raw-loader!./ExampleNoDropdownIfEmptyInput';
storiesOf('4. Selection', module).add('4.1 + InputWithOptions', function () {
return React.createElement(
TabbedView,
{ tabs: ['API', 'Testkit'] },
React.createElement(
'div',
null,
React.createElement(Markdown, { source: Readme }),
React.createElement(
'h1',
null,
'Usage examples'
),
React.createElement(
CodeExample,
{ title: 'Standard', code: ExampleStandardRaw },
React.createElement(ExampleStandard, null)
),
React.createElement(
CodeExample,
{ title: 'Dropdown size', code: ExampleDropdownSizeRaw },
React.createElement(ExampleDropdownSize, null)
),
React.createElement(
CodeExample,
{
title: 'No dropdown if input is empty',
code: ExampleNoDropdownIfEmptyInputRaw
},
React.createElement(ExampleNoDropdownIfEmptyInput, null)
),
React.createElement(
CodeExample,
{ title: 'Controlled input', code: ExampleControlledRaw },
React.createElement(ExampleControlled, null)
)
),
React.createElement(Markdown, { source: ReadmeTestkit })
);
});