@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 © 2026 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"),g=require("@progress/kendo-react-common"),C=require("@progress/kendo-react-intl"),c=require("./messages/index.js"),f=require("@progress/kendo-react-buttons");function m(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=m(l),v=e=>{const n=C.useLocalization(),t=i.useContext(u.GridContext),o=a=>{t.exportAsCsv(),e.onClick&&e.onClick.call(void 0,a)},s=g.classNames("k-grid-csv",e.className),r=n.toLanguageString(c.exportCSV,c.messages[c.exportCSV]);return i.createElement(f.Button,{title:r,type:"button",...e,icon:"file-csv",svgIcon:d.fileCsvIcon,className:s,onClick:o},e.children||r)};exports.GridCsvExportButton=v;