order | title | ||||
---|---|---|---|---|---|
8 |
|
在 Segmented Item 选项中只设置 Icon。
Set icon
without label
for Segmented Item.
import { Segmented } from 'antd';
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
const Demo = () => (
<Segmented
options={[
{
value: 'List',
icon: <BarsOutlined />,
},
{
value: 'Kanban',
icon: <AppstoreOutlined />,
},
]}
/>
);
export default Demo;