Merge branch 'master' into prefix-redux-actions-plugins

This commit is contained in:
Kiwi
2017-07-26 11:15:44 +02:00
committed by GitHub
22 changed files with 447 additions and 168 deletions
@@ -24,6 +24,15 @@
cursor: pointer;
}
.noSelect {
-ms-user-select:none;
-moz-user-select: none;
-webkit-user-select: none;
-webkit-touch-callout:none;
user-select: none;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}
.tooltip {
top: 36px;
left: auto;
@@ -15,13 +15,15 @@ export default class Tag extends React.Component {
}
showTooltip = () => {
showTooltip = e => {
e.preventDefault();
this.setState({
tooltip: true
});
}
hideTooltip = () => {
hideTooltip = (e) => {
e.preventDefault();
this.setState({
tooltip: false
});
@@ -30,10 +32,13 @@ export default class Tag extends React.Component {
render() {
const {tooltip} = this.state;
return(
<div onMouseEnter={this.showTooltip} onMouseLeave={this.hideTooltip} >
<div className={styles.noSelect} onMouseEnter={this.showTooltip}
onMouseLeave={this.hideTooltip} onTouchStart={this.showTooltip}
onTouchEnd={this.hideTooltip}>
{
isTagged(this.props.comment.tags, 'FEATURED') ? (
<span className={cn(styles.tag, {[styles.on]: tooltip})}>
<span
className={cn(styles.tag, styles.noSelect, {[styles.on]: tooltip})}>
{t('talk-plugin-featured-comments.featured')}
</span>
) : null