Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 539 Bytes

icon-only.md

File metadata and controls

36 lines (29 loc) · 539 Bytes
order title
8
zh-CN en-US
只设置图标
With Icon only

zh-CN

在 Segmented Item 选项中只设置 Icon。

en-US

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;