1 line
1.3 KiB
JSON
1 line
1.3 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 PropTypes from 'prop-types';\nvar propTypes = {\n /**\n * Specify whether the feedback is for valid or invalid fields\n *\n * @type {('valid'|'invalid')}\n */\n type: PropTypes.string.isRequired,\n as: PropTypes.elementType\n};\nvar defaultProps = {\n type: 'valid'\n};\nvar Feedback = React.forwardRef( // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\nfunction (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n className = _ref.className,\n type = _ref.type,\n props = _objectWithoutPropertiesLoose(_ref, [\"as\", \"className\", \"type\"]);\n\n return React.createElement(Component, _extends({}, props, {\n ref: ref,\n className: classNames(className, type && type + \"-feedback\")\n }));\n});\nFeedback.displayName = 'Feedback';\nFeedback.propTypes = propTypes;\nFeedback.defaultProps = defaultProps;\nexport default Feedback;","map":null,"metadata":{},"sourceType":"module"} |