Adjust respect button styles

This commit is contained in:
Chi Vinh Le
2017-04-04 13:04:58 +07:00
parent 5609715e77
commit bdc3a79b27
3 changed files with 33 additions and 27 deletions
@@ -1,5 +1,6 @@
import React from 'react';
import cn from 'classnames';
export default () => (
<i className="fa fa-handshake-o" aria-hidden="true"/>
export default ({className}) => (
<i className={cn('fa', 'fa-handshake-o', className)} aria-hidden="true"/>
);
+5 -3
View File
@@ -3,7 +3,9 @@ import styles from './style.css';
import Icon from './components/Icon';
import {I18n} from 'coral-framework';
import cn from 'classnames';
import translations from './translations.json';
const lang = new I18n(translations);
import {getActionSummary} from 'coral-framework/utils';
@@ -73,12 +75,12 @@ class RespectButton extends React.Component {
if (localDelete) {count -= 1;}
return (
<div className={styles.Respect}>
<div className={styles.respect}>
<button
className={respected ? styles.respected : ''}
className={cn(styles.button, {[styles.respected]: respected})}
onClick={this.handleClick} >
<span>{lang.t(respected ? 'respected' : 'respect')}</span>
<Icon />
<Icon className={cn(styles.icon, {[styles.respected]: respected})} />
{count > 0 && count}
</button>
</div>
+25 -22
View File
@@ -1,27 +1,30 @@
.Respect {
display: inline-block;
button {
color: #161616;
margin: 5px 10px 5px 0px;
background: none;
padding: 0px;
border: none;
font-size: inherit;
.respect {
display: inline-block;
}
&:hover {
color: #d6ab00;
cursor: pointer;
}
}
.button {
color: #2a2a2a;
margin: 5px 10px 5px 0px;
background: none;
padding: 0px;
border: none;
font-size: inherit;
.respected {
color: #ffcc00;
i {
color: #161616;
}
}
&:hover {
color: #767676;
cursor: pointer;
}
i {
padding: 0 5px;
&.respected {
color: #c98211;
&:hover {
color: #e59614;
cursor: pointer;
}
}
}
.icon {
padding: 0 5px;
}