提交 62bf5217 authored 作者: vipcxj's avatar vipcxj

backup

上级 ee412e6b
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import 'babel-polyfill';
import { configure } from '@storybook/react';
function loadStories() {
require('../stories');
}
configure(loadStories, module);
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import dva from 'dva';
import createLoading from 'dva-loading';
import { Button, Welcome } from '@storybook/react/demo';
import DsTable from '../src/components/table/dstable';
storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);
storiesOf('Button', module)
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
.add('with some emoji', () => <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>);
const Wrapper = () => Comp => (props) => {
const app = dva({});
app.use(createLoading({
effects: true,
}));
const { children, ...rest } = props;
app.router(() => <Comp app={app} {...rest}>{ children }</Comp>);
return app.start()();
};
storiesOf('a', module)
.add('1', () => {
const Comp = Wrapper()(DsTable);
return <Comp />;
});
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论