Name things in a sane way

This commit is contained in:
Luke Barnard 2017-11-07 15:13:26 +00:00
parent 62305a1ccd
commit ddc1ff2f23
2 changed files with 11 additions and 11 deletions

View file

@ -661,9 +661,9 @@ export default React.createClass({
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
const TintableSvg = sdk.getComponent('elements.TintableSvg');
const Spinner = sdk.getComponent('elements.Spinner');
const ToolTip = sdk.getComponent('elements.ToolTip');
const ToolTipButton = sdk.getComponent('elements.ToolTipButton');
const roomsHelpNode = this.state.editing ? <ToolTip helpText={
const roomsHelpNode = this.state.editing ? <ToolTipButton helpText={
_t(
'These rooms are displayed to community members on the community page. '+
'Community members can join the rooms by clicking on them.',

View file

@ -18,38 +18,38 @@ import React from 'react';
import sdk from '../../../index';
module.exports = React.createClass({
displayName: 'ToolTip',
displayName: 'ToolTipButton',
getInitialState: function() {
return {
hover: false,
}
};
},
onMouseOver: function() {
this.setState({
hover: true,
})
});
},
onMouseOut: function() {
this.setState({
hover: false,
})
});
},
render: function() {
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
const RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
const tip = this.state.hover ? <RoomTooltip
className="mx_ToolTip_container"
tooltipClassName="mx_ToolTip_helpText"
className="mx_ToolTipButton_container"
tooltipClassName="mx_ToolTipButton_helpText"
label={this.props.helpText}
/> : <div />;
return (
<div className="mx_ToolTip"onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} >
<div className="mx_ToolTipButton"onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} >
?
{ tip }
</div>
);
}
},
});