UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

13 lines (12 loc) • 586 B
import { isValidElement } from "react"; import { jsx } from "react/jsx-runtime"; //#region src/awesome/landingIcon.tsx const isElementType = (icon) => typeof icon === "function" || typeof icon === "object" && icon !== null && !isValidElement(icon) && "$$typeof" in icon; /** Renders an icon given either a component (e.g. from `@lobehub/icons`) or a ready-made node. */ const renderLandingIcon = (icon, size) => { if (!isElementType(icon)) return icon; return /* @__PURE__ */ jsx(icon, { size }); }; //#endregion export { renderLandingIcon }; //# sourceMappingURL=landingIcon.mjs.map