Re-add bouncing/callout animation to action buttons

This commit is contained in:
Luke Barnard 2017-05-25 13:54:59 +01:00
parent 548f319816
commit 3185d3ed41
5 changed files with 11 additions and 4 deletions

View file

@ -27,6 +27,7 @@ export default React.createClass({
size: PropTypes.string,
tooltip: PropTypes.bool,
action: PropTypes.string.isRequired,
mouseOverAction: PropTypes.string,
label: PropTypes.string.isRequired,
iconPath: PropTypes.string.isRequired,
},
@ -51,6 +52,9 @@ export default React.createClass({
_onMouseEnter: function() {
if (this.props.tooltip) this.setState({showTooltip: true});
if (this.props.mouseOverAction) {
dis.dispatch({action: this.props.mouseOverAction});
}
},
_onMouseLeave: function() {