MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / FormGroup

Function FormGroup

src/FormGroup.js:20–56  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

18};
19
20function FormGroup(props) {
21 const {
22 className,
23 cssModule,
24 row,
25 disabled,
26 check,
27 inline,
28 floating,
29 noMargin,
30 tag: Tag = 'div',
31 switch: switchProp,
32 ...attributes
33 } = props;
34
35 const formCheck = check || switchProp;
36
37 const classes = mapToCssModules(
38 classNames(
39 className,
40 row ? 'row' : false,
41 formCheck ? 'form-check' : false,
42 switchProp ? 'form-switch' : false,
43 formCheck || noMargin ? false : 'mb-3',
44 formCheck && inline ? 'form-check-inline' : false,
45 formCheck && disabled ? 'disabled' : false,
46 floating && 'form-floating',
47 ),
48 cssModule,
49 );
50
51 if (Tag === 'fieldset') {
52 attributes.disabled = disabled;
53 }
54
55 return <Tag {...attributes} className={classes} />;
56}
57
58FormGroup.propTypes = propTypes;
59

Callers

nothing calls this directly

Calls 1

mapToCssModulesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…