import * as React from 'react' import * as cx from 'classnames' import { Column } from './column' import { Icon } from './icon' import { Row } from './row' import { Divider } from './divider' import { FormBoxProps } from '../interfaces' const styles = require('../../src/styles/components/form-box.scss') const borders = require('../../src/styles/common/borders.scss') const xs = { flexDirection: 'column', justifyContent: 'center', } const md = { flexDirection: 'row', justifyContent: 'flex-start', } export class FormBox extends React.Component { public render() { const { IconComponent } = this.props return ( {/* JAMES PLEASE MAKE THIS WORK: }*/} {IconComponent ? IconComponent : }

{this.props.title}

{this.props.subtitle}

{this.props.children} {this.props.errors.length ? *{this.props.errors[0]} : null}
) } protected classNames(): string { const { valid, errors } = this.props return cx( this.props.className, styles.container, { [borders.error]: errors.length > 0, [borders.success]: valid && !errors.length, }, ) } }