ant-design/components/segmented/demo/with-icon.md
vagusX eee3b50727
feat: support icon only in segmented (#35256)
* feat: support icon only with segmented

* fix: lint issue

* chore: update

* test: fix

* test: update snapshot
2022-04-28 19:39:52 +08:00

531 B

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';

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