import type { ReactText } from 'react';
import React, { useState } from 'react';
import { Button, Progress, Tag } from 'infrad';
import { EllipsisOutlined } from 'infra-design-icons';
import ProList from 'infrad-pro-list';
const types = ['top', 'inline', 'new'];
const data = ['语雀的天空(top)', 'Ant Design(inline)', '蚂蚁金服体验科技(new)', 'TechUI'].map(
(item, index) => ({
title: item,
subTitle: 语雀专栏,
actions: [
邀请,
操作,
,
],
description: (
top 会有小角标
inline 标题字体是 normal
new 会有一个入场动画
),
type: types[index],
avatar: 'https://gw.alipayobjects.com/zos/antfincdn/UCSiy1j6jx/xingzhuang.svg',
content: (
),
}),
);
export default () => {
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const rowSelection = {
selectedRowKeys,
onChange: (keys: ReactText[]) => setSelectedRowKeys(keys),
};
const [dataSource, setDataSource] = useState([...data] as any[]);
return (
<>
metas={{
title: {},
subTitle: {},
type: {},
description: {},
avatar: {},
content: {},
actions: {},
}}
toolBarRender={() => [
,
]}
rowKey="id"
headerTitle="预设的列状态"
rowSelection={rowSelection}
dataSource={dataSource}
expandable={{ expandedRowKeys, onExpandedRowsChange: setExpandedRowKeys }}
/>
>
);
};