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

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'; ...@@ -3,6 +3,7 @@ import * as classNames from 'classnames';
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder'; import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
import FavoriteIcon from '@material-ui/icons/Favorite'; import FavoriteIcon from '@material-ui/icons/Favorite';
import Tooltip from '@material-ui/core/Tooltip';
import { trackPiwikEvent } from '../piwik/piwik'; import { trackPiwikEvent } from '../piwik/piwik';
class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButtonState> { class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButtonState> {
...@@ -43,14 +44,18 @@ class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButton ...@@ -43,14 +44,18 @@ class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButton
render() { render() {
if (this.state.isFavorite) { if (this.state.isFavorite) {
return ( return (
<FavoriteIcon onClick={this.handleClick} <Tooltip title="Remove Favorite">
className={classNames('favorite-button-heart', 'favorite-button-heart-favorited')} /> <FavoriteIcon onClick={this.handleClick}
className={classNames('favorite-button-heart', 'favorite-button-heart-favorited')} />
</Tooltip>
); );
} }
return ( return (
<FavoriteBorderIcon onClick={this.handleClick} <Tooltip title="Add Favorite">
className={classNames('favorite-button-heart')} /> <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