import React, { useMemo } from 'react'; // import { withKnobs, text, boolean } from '@storybook/addon-knobs'; import withPropsCombinations from 'react-storybook-addon-props-combinations'; import { Table } from '@douyinfe/semi-ui/'; import Skeleton from '../index'; import Avatar from '../../avatar'; export default { title: 'Skeleton' } export const _Skeleton = () => (
} loading={true}> U } loading={true}> U } loading={true}> U } loading={true}> U } loading={true}> U
); export const _Table = () => { const Demo = () => { const phArray = [1, 2, 1, 1, 1, 1, 2, 1]; const columns = useMemo( () => phArray.map((key, idx) => { const item = {}; item.title = ; item.dataIndex = key; item.key = idx; return item; }), phArray ); const dataSource = useMemo( () => [1, 2, 3, 4, 5].map(key => { const item = {}; item.key = key; phArray.forEach(i => { const width = 50 * i; item[i] = ; }); return item; }), [] ); const placeholder = (
); return ; }; return ; }; _Table.story = { name: 'table', };