UNPKG

@progress/kendo-react-spreadsheet

Version:
40 lines (39 loc) 1.3 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 { DropDownList as l } from "@progress/kendo-react-dropdowns"; import { FONT_FAMILIES as s, DEFAULT_FONT_FAMILY as f } from "./utils.mjs"; import { useLocalization as p } from "@progress/kendo-react-intl"; import { keys as o, messages as u } from "../messages.mjs"; const c = (a) => { const { spreadsheetRef: e, value: n } = a, r = t.useCallback((m) => { if (e.current) { const i = { command: "PropertyChangeCommand", options: { property: "fontFamily", value: m.value || null } }; e.current.executeCommand(i); } }, []); return /* @__PURE__ */ t.createElement( l, { onChange: r, value: n, data: s, defaultValue: f, fillMode: "flat", title: p().toLanguageString(o.fontName, u[o.fontName]), leftRightKeysNavigation: !1 } ); }; c.displayName = "FontFamily"; export { c as FontFamily };