import * as React from 'react' import * as cx from 'classnames' import { StylableComponent } from '../theme' import { Column } from '../flex' import { Icon } from '../icon' import { Row } from '../flex' import { Divider } from '../divider' import { FormBoxProps } from './interfaces' const styles = require('../../../src/components/form-box/styles.scss') const borders = require('../../../src/components/styles/globals/borders.scss') const xs = { flexDirection: 'column', justifyContent: 'center', } const md = { flexDirection: 'row', justifyContent: 'flex-start', } export class FormBox extends StylableComponent { public render() { const { IconComponent } = this.props return ( {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, }, ) } }