({ label, meta, input, field, children })
| 13 | import animations from './animations.json' |
| 14 | |
| 15 | const FieldGroup = ({ label, meta, input, field, children }) => { |
| 16 | const attrs = field.attrs || {} |
| 17 | const error = meta.touched && meta.error |
| 18 | const help = field.description || field.help |
| 19 | |
| 20 | const controlComponent = children ? children : (<FormControl {...input} {...attrs} />) |
| 21 | return ( |
| 22 | <FormGroup controlId={input.name}> |
| 23 | <ControlLabel>{label}</ControlLabel> |
| 24 | {controlComponent} |
| 25 | <FormControl.Feedback /> |
| 26 | {help && <HelpBlock>{help}</HelpBlock>} |
| 27 | {error && <HelpBlock>{error}</HelpBlock>} |
| 28 | </FormGroup> |
| 29 | ) |
| 30 | } |
| 31 | |
| 32 | const FormLayout = (props) => { |
| 33 | const { children, invalid, handleSubmit, submitSucceeded, submitting, isCreate } = props |
nothing calls this directly
no outgoing calls
no test coverage detected