Commit ef7d7c65 authored by Matthew J Endries's avatar Matthew J Endries

Add tooltip to favorite

parent 598b4b67
Pipeline #4179 passed with stages
in 2 minutes and 6 seconds
......@@ -3,6 +3,7 @@ import * as classNames from 'classnames';
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
import FavoriteIcon from '@material-ui/icons/Favorite';
import Tooltip from '@material-ui/core/Tooltip';
import { trackPiwikEvent } from '../piwik/piwik';
class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButtonState> {
......@@ -43,14 +44,18 @@ class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButton
render() {
if (this.state.isFavorite) {
return (
<FavoriteIcon onClick={this.handleClick}
className={classNames('favorite-button-heart', 'favorite-button-heart-favorited')} />
<Tooltip title="Remove Favorite">
<FavoriteIcon onClick={this.handleClick}
className={classNames('favorite-button-heart', 'favorite-button-heart-favorited')} />
</Tooltip>
);
}
return (
<FavoriteBorderIcon onClick={this.handleClick}
className={classNames('favorite-button-heart')} />
<Tooltip title="Add Favorite">
<FavoriteBorderIcon onClick={this.handleClick}
className={classNames('favorite-button-heart')} />
</Tooltip>
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment