@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
9 lines (8 loc) • 1.39 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),u=require("./utils/GridContext.js"),d=require("@progress/kendo-svg-icons"),f=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),c=require("./messages/index.js"),m=require("@progress/kendo-react-buttons");function x(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=x(l),k=e=>{const n=g.useLocalization(),t=i.useContext(u.GridContext),o=s=>{t.exportAsPdf(),e.onClick&&e.onClick.call(void 0,s)},a=f.classNames("k-grid-pdf",e.className),r=n.toLanguageString(c.exportPDF,c.messages[c.exportPDF]);return i.createElement(m.Button,{title:r,type:"button",...e,icon:"file-pdf",svgIcon:d.filePdfIcon,className:a,onClick:o},e.children||r)};exports.GridPdfExportButton=k;