mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 15:02:33 +08:00
Adjust respect button styles
This commit is contained in:
@@ -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"/>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user