import React, { Component } from 'react'; import { Broadcast } from 'react-broadcast'; import { Field } from 'redux-form'; import Fieldset from './fieldset'; import Baseline from '../baseline'; import PropTypes from 'prop-types'; import rndId from 'rnd-id'; class FormGroup extends Component { constructor(props) { super(props); this.renderGroup = this.renderGroup.bind(this); } renderGroup(inputProps) { const { className, style, children, ...rest } = this.props; const value = { id: rndId(), ...rest, ...inputProps }; return (
); } render() { const { name = rndId(), reduxForm = false, ...rest } = this.props; if (!reduxForm) { return this.renderGroup({}); } return