Fix routing issues. Fix panel layout.

This commit is contained in:
John Lyon-Smith
2018-03-23 13:49:41 -07:00
parent 54365d3566
commit ce25d56dfe
17 changed files with 240 additions and 98 deletions

View File

@@ -1,14 +1,17 @@
import Radium from 'radium'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { sizeInfo } from './style'
// See https://www.flaticon.com/packs/free-basic-ui-elements
@Radium
export class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
size: PropTypes.number,
margin: PropTypes.number,
style: PropTypes.object,
}
static defaultProps = {
@@ -33,11 +36,11 @@ export class Icon extends Component {
}
render() {
let { size, name, margin } = this.props
let { size, name, margin, style } = this.props
let source = Icon.svgs[name] || Icon.svgs['placeholder']
size -= margin * 2
return <img style={{ width: size, height: size, margin }} src={source} />
return <img style={[{ width: size, height: size, margin }, style]} src={source} />
}
}