MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / FieldGroup

Function FieldGroup

xadmin-dashboard/src/editor/components/PropForm.js:15–30  ·  view source on GitHub ↗
({ label, meta, input, field, children })

Source from the content-addressed store, hash-verified

13import animations from './animations.json'
14
15const 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
32const FormLayout = (props) => {
33 const { children, invalid, handleSubmit, submitSucceeded, submitting, isCreate } = props

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected