UNPKG

@progress/kendo-react-common

Version:

React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package

10 lines (9 loc) 1.31 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use client"; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),m=require("./Icon.js"),d=require("./SvgIcon.js"),I=require("./IconsContext.js");function y(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(c,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return c.default=e,Object.freeze(c)}const r=y(g),u=r.forwardRef((e,c)=>{var i,s;const{type:o,icons:t}=r.useContext(I.IconsContext),{icon:l,...f}=e;let n=o==="svg"?((i=e.icon)==null?void 0:i.name)||e.name:e.name||((s=e.icon)==null?void 0:s.name);n=n&&t&&t[n]&&typeof t[n]=="string"?t[n]:n;const a=n&&t&&t[n]&&typeof t[n]!="string"?t[n]:l;return o==="svg"&&a?r.createElement(d.SvgIcon,{...e,icon:a,ref:c}):r.createElement(m.Icon,{...f,name:n,ref:c})});u.displayName="KendoIconWrap";exports.IconWrap=u;