ant-design/components/segmented/demo/with-icon.md
MadCcc 3511642337
docs: segmented update (#35171)
* docs: segmented update

* test: fix lint
2022-04-22 12:26:44 +08:00

531 B

order title
0
zh-CN en-US
设置图标 With Icon

zh-CN

给 Segmented Item 设置 Icon。

en-US

Set icon for Segmented Item.

import { Segmented } from 'antd';
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';

export default () => (
  <Segmented
    options={[
      {
        label: 'List',
        value: 'List',
        icon: <BarsOutlined />,
      },
      {
        label: 'Kanban',
        value: 'Kanban',
        icon: <AppstoreOutlined />,
      },
    ]}
  />
);