1 | import _extends from "@babel/runtime/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import clsx from 'clsx';
|
6 | import withStyles from '../styles/withStyles';
|
7 | export const styles = {
|
8 |
|
9 | root: {
|
10 | display: 'flex',
|
11 | flexDirection: 'column',
|
12 | flexWrap: 'wrap'
|
13 | },
|
14 |
|
15 |
|
16 | row: {
|
17 | flexDirection: 'row'
|
18 | }
|
19 | };
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | const FormGroup = React.forwardRef(function FormGroup(props, ref) {
|
27 | const {
|
28 | classes,
|
29 | className,
|
30 | row = false
|
31 | } = props,
|
32 | other = _objectWithoutPropertiesLoose(props, ["classes", "className", "row"]);
|
33 |
|
34 | return React.createElement("div", _extends({
|
35 | className: clsx(classes.root, className, row && classes.row),
|
36 | ref: ref
|
37 | }, other));
|
38 | });
|
39 | process.env.NODE_ENV !== "production" ? FormGroup.propTypes = {
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | |
46 |
|
47 |
|
48 | children: PropTypes.node,
|
49 |
|
50 | |
51 |
|
52 |
|
53 |
|
54 | classes: PropTypes.object,
|
55 |
|
56 | |
57 |
|
58 |
|
59 | className: PropTypes.string,
|
60 |
|
61 | |
62 |
|
63 |
|
64 | row: PropTypes.bool
|
65 | } : void 0;
|
66 | export default withStyles(styles, {
|
67 | name: 'MuiFormGroup'
|
68 | })(FormGroup); |
\ | No newline at end of file |