UNPKG

@progress/kendo-react-spreadsheet

Version:
44 lines (43 loc) 1.37 kB
/** * @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 t from "react"; import { Button as c } from "@progress/kendo-react-buttons"; import { bordersNoneIcon as m } from "@progress/kendo-svg-icons"; import { useLocalization as d } from "@progress/kendo-react-intl"; import { keys as n, messages as l } from "../messages.mjs"; const u = (r) => { const { value: i, spreadsheetRef: e } = r, s = t.useCallback(() => { if (e.current) { const o = e.current.activeSheet(); if (o) { const a = { command: "GridLinesChangeCommand", options: { property: "gridLines", value: !o.showGridLines() } }; e.current.executeCommand(a); } } }, []); return /* @__PURE__ */ t.createElement( c, { type: "button", togglable: !0, icon: "borders-none", svgIcon: m, fillMode: "flat", title: d().toLanguageString(n.gridLines, l[n.gridLines]), onClick: s, selected: i } ); }; u.displayName = "GridLines"; export { u as GridLines };