Skip to content

Commit

Permalink
feat(ToastMessage): add handleMouse{Enter/Leave} for internal api
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Oct 12, 2014
1 parent a90a47c commit 6f340ff
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ToastMessage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ var ToastMessageSpec = {
toastClass[iconClassName] = true;

return (
<div className={cx(toastClass)} style={props.style || {}} onClick={this.handleOnClick}>
<div className={cx(toastClass)} style={props.style || {}}
onClick={this.handleOnClick}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}>
{this._render_close_button(props)}
{this._render_title_element(props)}
{this._render_message_element(props)}
Expand All @@ -77,5 +80,11 @@ var jQuery = React.createClass(update(ToastMessageSpec, {
mixins: { $set: [require("./jQueryMixin")] }
}));

/*
* assign default noop functions
*/
ToastMessageSpec.handleMouseEnter = noop;
ToastMessageSpec.handleMouseLeave = noop;

var ToastMessage = module.exports = React.createClass(ToastMessageSpec);
ToastMessage.jQuery = jQuery;

0 comments on commit 6f340ff

Please sign in to comment.