UNPKG

@progress/kendo-react-grid

Version:

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

36 lines (35 loc) 1.25 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 e from "react"; import { GridContext as l } from "./utils/GridContext.mjs"; import { filePdfIcon as s } from "@progress/kendo-svg-icons"; import { classNames as f } from "@progress/kendo-react-common"; import { useLocalization as d } from "@progress/kendo-react-intl"; import { exportPDF as i, messages as u } from "./messages/index.mjs"; import { Button as x } from "@progress/kendo-react-buttons"; const N = (t) => { const n = d(), r = e.useContext(l), c = (a) => { r.exportAsPdf(), t.onClick && t.onClick.call(void 0, a); }, m = f("k-grid-pdf", t.className), o = n.toLanguageString(i, u[i]); return /* @__PURE__ */ e.createElement( x, { title: o, type: "button", ...t, icon: "file-pdf", svgIcon: s, className: m, onClick: c }, t.children || o ); }; export { N as GridPdfExportButton };