mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Merge branch 'master' into prefix-redux-actions-plugins
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user