(Component, opts)
| 9205 | } |
| 9206 | |
| 9207 | function createBootstrapComponent(Component, opts) { |
| 9208 | if (typeof opts === 'string') opts = { |
| 9209 | prefix: opts |
| 9210 | }; |
| 9211 | var isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref |
| 9212 | |
| 9213 | var _opts = opts, |
| 9214 | prefix = _opts.prefix, |
| 9215 | _opts$forwardRefAs = _opts.forwardRefAs, |
| 9216 | forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs; |
| 9217 | return forwardRef_default()(function (_ref, ref) { |
| 9218 | var props = _extends({}, _ref); |
| 9219 | |
| 9220 | props[forwardRefAs] = ref; |
| 9221 | var prefixes = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(ThemeContext); |
| 9222 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, _extends({}, props, { |
| 9223 | // eslint-disable-next-line react/prop-types |
| 9224 | bsPrefix: props.bsPrefix || prefixes.get(prefix) || prefix, |
| 9225 | __source: { |
| 9226 | fileName: _jsxFileName, |
| 9227 | lineNumber: 42 |
| 9228 | }, |
| 9229 | __self: this |
| 9230 | })); |
| 9231 | }, { |
| 9232 | displayName: "Bootstrap(" + (Component.displayName || Component.name) + ")" |
| 9233 | }); |
| 9234 | } |
| 9235 | |
| 9236 | |
| 9237 | /* harmony default export */ var src_ThemeProvider = (ThemeProvider_ThemeProvider); |
no test coverage detected
searching dependent graphs…