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 aspectRatio: '1by1'\n};\nvar ResponsiveEmbed = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n aspectRatio = _ref.aspectRatio,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"children\", \"aspectRatio\"]);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'embed-responsive');\n var child = React.Children.only(children);\n return React.createElement(\"div\", _extends({\n ref: ref\n }, props, {\n className: classNames(decoratedBsPrefix, className, aspectRatio && decoratedBsPrefix + \"-\" + aspectRatio)\n }), React.cloneElement(child, {\n className: classNames(child.props.className, decoratedBsPrefix + \"-item\")\n }));\n});\nResponsiveEmbed.defaultProps = defaultProps;\nexport default ResponsiveEmbed;","map":null,"metadata":{},"sourceType":"module"} |