UNPKG

wix-style-react

Version:
50 lines (45 loc) 1.65 kB
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/AutoComplete/README.md'; import ReadmeTestKit from '../../src/AutoComplete/README.TESTKIT.md'; import ExampleStandard from './ExampleStandard'; import ExampleStandardRaw from '!raw-loader!./ExampleStandard'; import ExampleControlled from './ExampleControlled'; import ExampleControlledRaw from '!raw-loader!./ExampleControlled'; import ExampleComplex from './ExampleComplex'; import ExampleComplexRaw from '!raw-loader!./ExampleComplex'; storiesOf('4. Selection', module).add('4.1 + AutoComplete', function () { return React.createElement( TabbedView, { tabs: ['API', 'TestKits'] }, 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: 'Controlled input', code: ExampleControlledRaw }, React.createElement(ExampleControlled, null) ), React.createElement( CodeExample, { title: 'Complex input', code: ExampleComplexRaw }, React.createElement(ExampleComplex, null) ) ), React.createElement(Markdown, { source: ReadmeTestKit }) ); });