forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support icon only in segmented (ant-design#35256)
* feat: support icon only with segmented * fix: lint issue * chore: update * test: fix * test: update snapshot
- Loading branch information
Showing
14 changed files
with
324 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 10 | ||
order: 1 | ||
title: | ||
zh-CN: Block 分段选择器 | ||
en-US: Block Segmented | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 0 | ||
order: 3 | ||
title: | ||
zh-CN: 受控模式 | ||
en-US: Controlled mode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 1 | ||
order: 4 | ||
title: | ||
zh-CN: 自定义渲染 | ||
en-US: Custom Render | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 0 | ||
order: 2 | ||
title: | ||
zh-CN: 不可用 | ||
en-US: Basic | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 0 | ||
order: 5 | ||
title: | ||
zh-CN: 动态数据 | ||
en-US: Dynamic | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
order: 8 | ||
title: | ||
zh-CN: 只设置图标 | ||
en-US: With Icon only | ||
--- | ||
|
||
## zh-CN | ||
|
||
在 Segmented Item 选项中只设置 Icon。 | ||
|
||
## en-US | ||
|
||
Set `icon` without `label` for Segmented Item. | ||
|
||
```jsx | ||
import { Segmented } from 'antd'; | ||
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons'; | ||
|
||
export default () => ( | ||
<Segmented | ||
options={[ | ||
{ | ||
value: 'List', | ||
icon: <BarsOutlined />, | ||
}, | ||
{ | ||
value: 'Kanban', | ||
icon: <AppstoreOutlined />, | ||
}, | ||
]} | ||
/> | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 1 | ||
order: 6 | ||
title: | ||
zh-CN: 三种大小 | ||
en-US: Three sizes of Segmented | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 0 | ||
order: 7 | ||
title: | ||
zh-CN: 设置图标 | ||
en-US: With Icon | ||
|
Oops, something went wrong.