Commit 2e77b8c3 authored by Andrew Hrdy's avatar Andrew Hrdy
Browse files

Favorite stars changed to hearts.

parent fb577ce1
import React from 'react' import React from 'react'
import {withStyles} from 'material-ui/styles'; import {withStyles} from 'material-ui/styles';
import yellow from 'material-ui/colors/yellow'; import grey from 'material-ui/colors/grey'
import StarIcon from 'material-ui-icons/Star'; import pink from 'material-ui/colors/pink';
import StarBorderIcon from 'material-ui-icons/StarBorder'; import FavoriteBorderIcon from 'material-ui-icons/FavoriteBorder';
import FavoriteIcon from 'material-ui-icons/Favorite';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
class FavoriteButton extends React.Component { class FavoriteButton extends React.Component {
...@@ -25,10 +26,12 @@ class FavoriteButton extends React.Component { ...@@ -25,10 +26,12 @@ class FavoriteButton extends React.Component {
render() { render() {
if (this.props.isFavorite) { if (this.props.isFavorite) {
return (<StarIcon onClick={this.handleClick} className={this.props.classes.star}/>); return (<FavoriteIcon onClick={this.handleClick} className={this.props.classes.heart}
style={{color: pink[400]}}/>);
} }
return (<StarBorderIcon onClick={this.handleClick} className={this.props.classes.star}/>); return (<FavoriteBorderIcon onClick={this.handleClick} className={this.props.classes.heart}
style={{color: grey[400]}}/>);
} }
} }
...@@ -41,14 +44,13 @@ FavoriteButton.propTypes = { ...@@ -41,14 +44,13 @@ FavoriteButton.propTypes = {
}; };
const styleSheet = { const styleSheet = {
star: { heart: {
position: 'absolute', position: 'absolute',
top: '0px', top: '0px',
right: '0px', right: '0px',
color: yellow[600], height: '24px',
height: '26px', width: '24px',
width: '26px', padding: '5px',
padding: '4px',
cursor: 'pointer', cursor: 'pointer',
} }
}; };
......
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