Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 551 Bytes

with-icon.md

File metadata and controls

38 lines (31 loc) · 551 Bytes
order title
7
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';

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

export default Demo;