Hover state for badges, now only on the badges themselves

This commit is contained in:
wmwragg 2016-08-03 14:09:10 +01:00
parent 2c2f689361
commit 8e19532e5a

View file

@ -186,9 +186,9 @@ module.exports = React.createClass({
} }
if (this.state.areNotifsMuted && !(this.state.badgeHover || this.state.menu)) { if (this.state.areNotifsMuted && !(this.state.badgeHover || this.state.menu)) {
badge = <div className={ badgeClasses } onClick={this.onBadgeClicked}><img className="mx_RoomTile_badgeIcon" src="img/icon-context-mute.svg" width="16" height="12" /></div>; badge = <div className={ badgeClasses } onClick={this.onBadgeClicked} onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave}><img className="mx_RoomTile_badgeIcon" src="img/icon-context-mute.svg" width="16" height="12" /></div>;
} else { } else {
badge = <div className={ badgeClasses } onClick={this.onBadgeClicked}>{ badgeContent }</div>; badge = <div className={ badgeClasses } onClick={this.onBadgeClicked} onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave}>{ badgeContent }</div>;
} }
var label; var label;
@ -234,7 +234,7 @@ module.exports = React.createClass({
<div className={avatarClasses}> <div className={avatarClasses}>
<RoomAvatar onClick={this.onClick} room={this.props.room} width={24} height={24} /> <RoomAvatar onClick={this.onClick} room={this.props.room} width={24} height={24} />
</div> </div>
<div className="mx_RoomTile_nameContainer" onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave}> <div className="mx_RoomTile_nameContainer">
{ label } { label }
{ badge } { badge }
</div> </div>