1 line
1.6 KiB
JSON
1 line
1.6 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport FormCheck from './FormCheck';\nimport FormControl from './FormControl';\nimport FormGroup from './FormGroup';\nimport FormLabel from './FormLabel';\nimport FormText from './FormText';\nimport Switch from './Switch';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport createWithBsPrefix from './createWithBsPrefix';\nvar defaultProps = {\n inline: false\n};\nvar Form = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n inline = _ref.inline,\n className = _ref.className,\n validated = _ref.validated,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'form' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"inline\", \"className\", \"validated\", \"as\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form');\n return React.createElement(Component, _extends({}, props, {\n ref: ref,\n className: classNames(className, validated && 'was-validated', inline && bsPrefix + \"-inline\")\n }));\n});\nForm.displayName = 'Form';\nForm.defaultProps = defaultProps;\nForm.Row = createWithBsPrefix('form-row');\nForm.Group = FormGroup;\nForm.Control = FormControl;\nForm.Check = FormCheck;\nForm.Switch = Switch;\nForm.Label = FormLabel;\nForm.Text = FormText;\nexport default Form;","map":null,"metadata":{},"sourceType":"module"} |