@progress/kendo-react-layout
Version:
React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package
35 lines (34 loc) • 1.18 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as e from "react";
import t from "prop-types";
import { useId as g } from "@progress/kendo-react-common";
const s = e.forwardRef((n, l) => {
const a = e.useRef(null), i = e.useCallback(
() => ({
element: a.current
}),
[]
);
e.useImperativeHandle(l, i);
const { className: c, style: m, id: d, children: p, row: u, col: y, rowSpan: r, colSpan: o } = n, f = g(), I = {
gridArea: `${u || "auto"} / ${y || "auto"} / ${r ? "span " + r : "auto"} / ${o ? "span " + o : "auto"}`,
...m
};
return /* @__PURE__ */ e.createElement("div", { ref: a, className: c, style: I, id: d || f }, p);
});
s.propTypes = {
className: t.string,
style: t.object,
children: t.any,
id: t.string
};
s.displayName = "KendoReactGridLayoutItem";
export {
s as GridLayoutItem
};