UNPKG

wix-style-react

Version:
42 lines (39 loc) 1.39 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 Example from './Example'; import ExampleRaw from '!raw-loader!./Example'; import ExampleControlled from './ExampleControlled'; import ExampleControlledRaw from '!raw-loader!./ExampleControlled'; import WixStyleDecorator from '../decorators/WixStyleDecorator'; import Readme from '../../../src/TPA/Button/README.md'; import ReadmeTestKit from '../../../src/TPA/Button/README.TESTKIT.md'; storiesOf('TPA', module).addDecorator(WixStyleDecorator).add('Button', function () { return React.createElement( TabbedView, { tabs: ['API', 'TestKits'] }, React.createElement( 'div', null, React.createElement(Markdown, { source: Readme }), React.createElement( 'h1', null, 'Example' ), React.createElement( CodeExample, { title: 'Themes', code: ExampleRaw }, React.createElement(Example, null) ), React.createElement( CodeExample, { title: 'Controlled', code: ExampleControlledRaw }, React.createElement(ExampleControlled, null) ) ), React.createElement(Markdown, { source: ReadmeTestKit }) ); });