Add more sort options and improve styling

This commit is contained in:
Chi Vinh Le
2017-08-25 20:15:07 +07:00
parent 9e2f6f1f63
commit e51e8c543f
32 changed files with 314 additions and 87 deletions
@@ -1,8 +1,12 @@
.input {
.label {
display: block;
cursor: pointer;
width: 100%;
padding: 4px 16px 4px 10px;
box-sizing: border-box;
}
.label {
.input {
cursor: pointer;
padding-left: 4px;
margin-right: 6px;
}
@@ -4,12 +4,15 @@ import styles from './SortOption.css';
export default class SortOption extends React.Component {
render() {
return (
<div className={styles.viewingOption}>
<input type="radio" onChange={this.props.setSort} checked={this.props.active} className={styles.input}/>
<label className={styles.label} onClick={this.props.setSort}>
{this.props.label}
</label>
</div>
<label className={styles.label}>
<input
type="radio"
onChange={this.props.setSort}
checked={this.props.active}
className={styles.input}
/>
{this.props.label}
</label>
);
}
}