Skip to content

Commit

Permalink
rename onRequestClose to onDismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
minwe committed May 6, 2016
1 parent ed81459 commit 84c682e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/amazeui.touch.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** Amaze UI Touch v1.0.0-beta.1 | by Amaze UI Team
* (c) 2016 AllMobilize, Inc., Licensed under MIT
* 2016-04-25T15:24:15+0800
* 2016-05-06T09:26:22+0800
*/
[class*="animation-"] {
-webkit-transform: translateZ(0);
Expand Down
2 changes: 1 addition & 1 deletion dist/amazeui.touch.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modal/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Modal 打开时的回调函数。
Modal 关闭以后的回调函数。

##### `onRequestClose`
##### `onDismiss`

> PropType: `func`
Expand Down
3 changes: 1 addition & 2 deletions kitchen-sink/pages/ModalExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ const ModalExample = React.createClass({
<Modal
ref="modal"
isOpen={this.state.isModalOpen}
onRequestClose={this.closeModal}
onDismiss={this.closeModal}
onOpen={this.onOpen}
onClosed={this.onClosed}
onBeforeConfirm={this.onBeforeConfirm}
onAction={this.handleAction}
{...this.props.modalProps}
>
Expand Down
6 changes: 3 additions & 3 deletions src/js/modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Modal = createClass({
onAction: PropTypes.func,
onOpen: PropTypes.func,
onClosed: PropTypes.func,
onRequestClose: PropTypes.func,
onDismiss: PropTypes.func,
},

getDefaultProps() {
Expand All @@ -48,7 +48,7 @@ const Modal = createClass({
onAction: noop,
onOpen: noop,
onClosed: noop,
onRequestClose: noop,
onDismiss: noop,
};
},

Expand Down Expand Up @@ -155,7 +155,7 @@ const Modal = createClass({

// for user actions
requestClose(e) {
this.props.onRequestClose(e);
this.props.onDismiss(e);
},

handleClosed() {
Expand Down

0 comments on commit 84c682e

Please sign in to comment.