Merge branch 'master' into slots-debug

This commit is contained in:
Kim Gardner
2018-03-12 18:08:16 -04:00
committed by GitHub
169 changed files with 3471 additions and 1229 deletions
@@ -1,16 +0,0 @@
.label {
display: block;
cursor: pointer;
width: 100%;
padding: 6px 16px 6px 10px;
box-sizing: border-box;
&:hover {
background-color: rgba(0, 0, 0, 0.05);
}
}
.input {
cursor: pointer;
margin-right: 6px;
}
@@ -1,30 +0,0 @@
import React from 'react';
import styles from './SortOption.css';
import PropTypes from 'prop-types';
export default class SortOption extends React.Component {
render() {
return (
<label className={styles.label}>
<input
type="radio"
onChange={this.props.setSort}
checked={this.props.active}
className={styles.input}
/>
{this.props.label}
</label>
);
}
}
SortOption.propTypes = {
// A simple callback to be called when clicking on this sort option.
setSort: PropTypes.func.isRequired,
// Whether or not this sort option is active.
active: PropTypes.bool.isRequired,
// Label to show next to the input control.
label: PropTypes.string.isRequired,
};
-13
View File
@@ -1,13 +0,0 @@
import withSortOption from '../hocs/withSortOption';
import SortOption from '../components/SortOption';
/**
* A factory creating a sort option component.
* @param {string|function} label label to display, can be a callback for lazy evaluation.
* @param {Object} sort sort parameters
* @param {string} sort.sortBy
* @param {string} sort.sortOrder
* @return {Object} Component
*/
export const createSortOption = (label, sort) =>
withSortOption({ ...sort, label })(SortOption);