UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

24 lines (23 loc) 918 B
import { P as c } from "./index-Sy88PpwE.js"; import { c as l } from "./chainPropTypes-D9lkm76m.js"; function f(n) { const { prototype: e = {} } = n; return !!e.isReactComponent; } function s(n, e, i, r, p) { const t = n[e], a = p || e; if (t == null || // When server-side rendering React doesn't warn either. // This is not an accurate check for SSR. // This is only in place for emotion compat. // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved. typeof window > "u") return null; let o; return typeof t == "function" && !f(t) && (o = "Did you accidentally provide a plain function component instead?"), o !== void 0 ? new Error(`Invalid ${r} \`${a}\` supplied to \`${i}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; } const d = l(c.elementType, s); export { d as e };