From 79102de9d2acd7287583d68104109ed47fcaab27 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Fri, 3 Mar 2017 13:21:42 -0500 Subject: [PATCH] Star and Coral UI added :D --- client/coral-plugin-best/BestButton.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/coral-plugin-best/BestButton.js b/client/coral-plugin-best/BestButton.js index ac0e75aaf..d1bceca37 100644 --- a/client/coral-plugin-best/BestButton.js +++ b/client/coral-plugin-best/BestButton.js @@ -1,6 +1,7 @@ import React, {Component, PropTypes} from 'react'; import {I18n} from '../coral-framework'; import translations from './translations.json'; +import {Icon} from 'coral-ui'; import classnames from 'classnames'; // tag string for best comments @@ -17,9 +18,9 @@ const lang = new I18n(translations); const canModifyBestTag = ({roles = []} = {}) => roles && ['ADMIN', 'MODERATOR'].some(role => roles.includes(role)); // Put this on a comment to show that it is best -export const BestIndicator = ({children = favorite}) => ( +export const BestIndicator = ({children = }) => ( - { children } + { children } ); @@ -69,7 +70,7 @@ export class BestButton extends Component { try { await addBest(); } finally { - this.setState({isSaving: false}); + this.setState({isSaving: false}); } } @@ -84,7 +85,7 @@ export class BestButton extends Component { try { await removeBest(); } finally { - this.setState({isSaving: false}); + this.setState({isSaving: false}); } } @@ -97,9 +98,7 @@ export class BestButton extends Component { disabled={disabled} className={classnames(`${name}-button`, `e2e__${isBest ? 'unset' : 'set'}-best-comment`)} aria-label={lang.t(isBest ? 'unsetBest' : 'setBest')}> - - { isBest ? 'favorite' : 'favorite_border' } - + ); }