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.
add suffix icon interface to time-picker
- Loading branch information
1 parent
844a5a9
commit a1074a6
Showing
5 changed files
with
88 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
order: 12 | ||
debug: true | ||
title: | ||
zh-CN: 后缀图标 | ||
en-US: Suffix | ||
--- | ||
|
||
## zh-CN | ||
|
||
点击 TimePicker,然后可以在浮层中选择或者输入某一时间。 | ||
|
||
## en-US | ||
|
||
Click `TimePicker`, and then we could select or input a time in panel. | ||
|
||
````jsx | ||
import { TimePicker, Icon } from 'antd'; | ||
import moment from 'moment'; | ||
|
||
function onChange(time, timeString) { | ||
console.log(time, timeString); | ||
} | ||
|
||
const icon = <Icon type="smile" />; | ||
|
||
ReactDOM.render( | ||
<TimePicker suffix={icon} onChange={onChange} defaultOpenValue={moment('00:00:00', 'HH:mm:ss')} />, | ||
mountNode | ||
); | ||
```` |
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