Selectable List in place

This commit is contained in:
John Lyon-Smith
2018-03-03 11:24:48 -08:00
parent 7756963eb2
commit 3ef0a3bdc9
19 changed files with 312 additions and 194 deletions

View File

@@ -8,10 +8,12 @@ export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
size: PropTypes.number,
margin: PropTypes.number,
}
static defaultProps = {
size: 50
size: 50,
margin: sizeInfo.iconMargin,
}
static svgs = {
@@ -25,9 +27,8 @@ export default class Icon extends Component {
}
render() {
let { size, name } = this.props
let { size, name, margin } = this.props
let source = Icon.svgs[name] || Icon.svgs['placeholder']
const margin = sizeInfo.iconMargin
size -= margin * 2