UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

21 lines (20 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"; import * as o from "react"; import { IconWrap as a, toIconName as p } from "@progress/kendo-react-common"; import { GridContext as I } from "../utils/GridContext.mjs"; import { chevronLeftIcon as d, chevronRightIcon as v, chevronDownIcon as f, chevronUpIcon as h } from "@progress/kendo-svg-icons"; const C = (t) => { const { title: l, iconClass: n, svgIcon: m, selected: i, expandable: r, expanded: s } = t, e = o.useContext(I); let c; return r && (e != null && e.mobileMode ? c = (e == null ? void 0 : e.dir) === "rtl" ? d : v : c = s ? h : f), /* @__PURE__ */ o.createElement("div", { onClick: t.onClick, className: `k-columnmenu-item ${i ? "k-selected" : ""}` }, (n || m) && /* @__PURE__ */ o.createElement(a, { name: n && p(n), icon: m }), l, /* @__PURE__ */ o.createElement("span", { className: "k-spacer" }), r && /* @__PURE__ */ o.createElement(a, { icon: c })); }; export { C as GridColumnMenuItem };