UNPKG

@progress/kendo-react-spreadsheet

Version:
52 lines (51 loc) 1.51 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 D } from "@progress/kendo-react-buttons"; import { useLocalization as f } from "@progress/kendo-react-intl"; import { keys as n, messages as I } from "../messages.mjs"; import { decimalIncreaseIcon as a, decimalDecreaseIcon as c } from "@progress/kendo-svg-icons"; const s = (i) => (m) => { const { icon: l, svgIcon: r, titleKey: e, value: u } = i, { spreadsheetRef: o } = m, d = t.useCallback(() => { if (o.current) { const p = { command: "AdjustDecimalsCommand", options: { value: u } }; o.current.executeCommand(p); } }, []); return /* @__PURE__ */ t.createElement( D, { type: "button", icon: l, svgIcon: r, fillMode: "flat", onClick: d, title: f().toLanguageString(e, I[e]) } ); }, g = s({ icon: a.name, svgIcon: a, value: 1, titleKey: n.increaseDecimal }); g.displayName = "IncreaseDecimal"; const y = s({ icon: c.name, svgIcon: c, value: -1, titleKey: n.decreaseDecimal }); y.displayName = "DecreaseDecimal"; export { y as DecreaseDecimal, g as IncreaseDecimal };