1 line
1.2 KiB
JSON
1 line
1.2 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 { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n variant: null\n};\nvar CardImg = 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 bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n variant = _ref.variant,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'img' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"variant\", \"as\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'card-img');\n return React.createElement(Component, _extends({\n ref: ref,\n className: classNames(variant ? prefix + \"-\" + variant : prefix, className)\n }, props));\n});\nCardImg.displayName = 'CardImg';\nCardImg.defaultProps = defaultProps;\nexport default CardImg;","map":null,"metadata":{},"sourceType":"module"} |