@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
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 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 a } from "./utils/GridContext.mjs";
import { fileCsvIcon as l } from "@progress/kendo-svg-icons";
import { classNames as C } from "@progress/kendo-react-common";
import { useLocalization as f } from "@progress/kendo-react-intl";
import { exportCSV as i, messages as u } from "./messages/index.mjs";
import { Button as v } from "@progress/kendo-react-buttons";
const N = (t) => {
const n = f(), c = e.useContext(a), r = (m) => {
c.exportAsCsv(), t.onClick && t.onClick.call(void 0, m);
}, s = C("k-grid-csv", t.className), o = n.toLanguageString(i, u[i]);
return /* @__PURE__ */ e.createElement(
v,
{
title: o,
type: "button",
...t,
icon: "file-csv",
svgIcon: l,
className: s,
onClick: r
},
t.children || o
);
};
export {
N as GridCsvExportButton
};