Skip to content

Commit

Permalink
Merge pull request #27 from shupac/master
Browse files Browse the repository at this point in the history
Added onClose prop
  • Loading branch information
mathieudutour authored Oct 8, 2017
2 parents dca0cb1 + 9a30c3b commit 7e16259
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions react-swipe-to-reveal-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
onRightClick: React.PropTypes.func,
onLeftClick: React.PropTypes.func,
onReveal: React.PropTypes.func,
onClose: React.PropTypes.func,
maxItemWidth: React.PropTypes.number,
parentWidth: React.PropTypes.number
},
Expand Down Expand Up @@ -235,6 +236,7 @@
onRightClick: function onRightClick() {},
onLeftClick: function onLeftClick() {},
onReveal: function onReveal() {},
onClose: function onClose() {},
closeOthers: function closeOthers() {},
maxItemWidth: 120,
parentWidth: (typeof window !== 'undefined' && window.outerWidth) || (typeof screen !== 'undefined' && screen.width) || 320
Expand Down Expand Up @@ -422,6 +424,7 @@
},

transitionBack: function transitionBack() {
this.props.onClose();
this.setState({
showLeftButtons: false,
showRightButtons: false,
Expand Down

0 comments on commit 7e16259

Please sign in to comment.