1 | import classNames from 'classnames';
|
2 | import PropTypes from 'prop-types';
|
3 | import * as React from 'react';
|
4 | import FormCheck from './FormCheck';
|
5 | import FormControl from './FormControl';
|
6 | import FormFloating from './FormFloating';
|
7 | import FormGroup from './FormGroup';
|
8 | import FormLabel from './FormLabel';
|
9 | import FormRange from './FormRange';
|
10 | import FormSelect from './FormSelect';
|
11 | import FormText from './FormText';
|
12 | import Switch from './Switch';
|
13 | import FloatingLabel from './FloatingLabel';
|
14 | import { jsx as _jsx } from "react/jsx-runtime";
|
15 | const propTypes = {
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | _ref: PropTypes.any,
|
25 | |
26 |
|
27 |
|
28 |
|
29 | validated: PropTypes.bool,
|
30 | as: PropTypes.elementType
|
31 | };
|
32 | const Form = React.forwardRef(({
|
33 | className,
|
34 | validated,
|
35 |
|
36 | as: Component = 'form',
|
37 | ...props
|
38 | }, ref) => _jsx(Component, {
|
39 | ...props,
|
40 | ref: ref,
|
41 | className: classNames(className, validated && 'was-validated')
|
42 | }));
|
43 | Form.displayName = 'Form';
|
44 | Form.propTypes = propTypes;
|
45 | export default Object.assign(Form, {
|
46 | Group: FormGroup,
|
47 | Control: FormControl,
|
48 | Floating: FormFloating,
|
49 | Check: FormCheck,
|
50 | Switch,
|
51 | Label: FormLabel,
|
52 | Text: FormText,
|
53 | Range: FormRange,
|
54 | Select: FormSelect,
|
55 | FloatingLabel
|
56 | }); |
\ | No newline at end of file |