UNPKG

@progress/kendo-react-layout

Version:

React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package

9 lines (8 loc) 1.34 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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),a=require("prop-types"),I=require("@progress/kendo-react-common");function R(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=R(b),c=n.forwardRef((e,r)=>{const t=n.useRef(null),o=n.useCallback(()=>({element:t.current}),[]);n.useImperativeHandle(r,o);const{className:i,style:u,id:d,children:m,row:p,col:y,rowSpan:s,colSpan:l}=e,f=I.useId(),g={gridArea:`${p||"auto"} / ${y||"auto"} / ${s?"span "+s:"auto"} / ${l?"span "+l:"auto"}`,...u};return n.createElement("div",{ref:t,className:i,style:g,id:d||f},m)});c.propTypes={className:a.string,style:a.object,children:a.any,id:a.string};c.displayName="KendoReactGridLayoutItem";exports.GridLayoutItem=c;