import * as React from 'react'
import { FormGroupProps } from '../interfaces'
import { Column } from '.'

const styles = require('../../src/styles/components/forms.scss')

export class FormGroup extends React.Component<FormGroupProps, {}> {
    public render() {
        const {id, label, children} = this.props
        return (
            <Column id={id} fullWidth justify="flex-start" className={styles.group}>
                <label className={styles.label}>{label}</label>
                {children}
            </Column>
        )
    }
}
