UNPKG

react-bootstrap-v5

Version:

Bootstrap 4 components built with React

36 lines (35 loc) 1.32 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import classNames from 'classnames'; import React from 'react'; import FormCheck from './FormCheck'; import FormFile from './FormFile'; import FormControl from './FormControl'; import FormGroup from './FormGroup'; import FormLabel from './FormLabel'; import FormRange from './FormRange'; import FormSelect from './FormSelect'; import FormText from './FormText'; import Switch from './Switch'; var FormImpl = React.forwardRef(function (_ref, ref) { var className = _ref.className, validated = _ref.validated, _ref$as = _ref.as, Component = _ref$as === void 0 ? 'form' : _ref$as, props = _objectWithoutPropertiesLoose(_ref, ["className", "validated", "as"]); return /*#__PURE__*/React.createElement(Component, _extends({}, props, { ref: ref, className: classNames(className, validated && 'was-validated') })); }); FormImpl.displayName = 'Form'; FormImpl.Group = FormGroup; FormImpl.Control = FormControl; FormImpl.Check = FormCheck; FormImpl.File = FormFile; FormImpl.Switch = Switch; FormImpl.Label = FormLabel; FormImpl.Text = FormText; FormImpl.Range = FormRange; FormImpl.Select = FormSelect; export default FormImpl;