Selectable List in place
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user