mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-21 10:31:10 +08:00

* feat[Segmented]:Unified use of orientation attribute * test: update snapshots * Update components/segmented/index.zh-CN.md Co-authored-by: thinkasany <480968828@qq.com> Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> * feat: change useVertical params * Update components/segmented/index.en-US.md Co-authored-by: thinkasany <480968828@qq.com> Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> * Update index.zh-CN.md Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> * feat: change demo * Update components/segmented/index.zh-CN.md Co-authored-by: thinkasany <480968828@qq.com> Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> * feat: use useOrientation get mergedVertical * feat: get type Orientation --------- Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> Co-authored-by: 刘欢 <lh01217311@antgroup.com> Co-authored-by: thinkasany <480968828@qq.com>
16 lines
357 B
TypeScript
16 lines
357 B
TypeScript
import React from 'react';
|
|
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
|
|
import { Segmented } from 'antd';
|
|
|
|
const Demo: React.FC = () => (
|
|
<Segmented
|
|
orientation="vertical"
|
|
options={[
|
|
{ value: 'List', icon: <BarsOutlined /> },
|
|
{ value: 'Kanban', icon: <AppstoreOutlined /> },
|
|
]}
|
|
/>
|
|
);
|
|
|
|
export default Demo;
|