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

@@ -2,6 +2,8 @@ import Radium from 'radium'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
// TODO: Refactor this to allow setting each border property separately
class Box extends Component {
static propTypes = {
borderTop: PropTypes.string,
@@ -9,17 +11,19 @@ class Box extends Component {
borderRight: PropTypes.string,
borderLeft: PropTypes.string,
border: PropTypes.string,
radius: PropTypes.number,
color: PropTypes.string,
children: PropTypes.node,
}
render() {
const { children, color, borderTop, borderBottom, borderLeft, borderRight, border } = this.props
const { children, color, borderTop, borderBottom, borderLeft, borderRight, border, radius } = this.props
return (
<div style={[
{ height: '100%', width: '100%' },
color && { backgroundColor: color },
radius && { borderRadius: radius },
border ? { border } : { borderTop, borderBottom, borderLeft, borderRight }]}>
{children}
</div>