@progress/kendo-react-spreadsheet
Version:
KendoReact Spreadsheet package
37 lines (36 loc) • 1.13 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
*-------------------------------------------------------------------------------------------
*/
import * as t from "react";
import { Button as n } from "@progress/kendo-react-buttons";
import { saveAs as c } from "@progress/kendo-file-saver";
import { Workbook as l } from "@progress/kendo-ooxml";
import { downloadIcon as a } from "@progress/kendo-svg-icons";
const s = (e) => {
const { spreadsheetRef: o } = e, r = t.useCallback(() => {
o.current && o.current.saveAsExcel({
...o.current.options.excel,
saveAs: c,
Workbook: l
});
}, []);
return /* @__PURE__ */ t.createElement(
n,
{
className: "k-toolbar-button",
title: "Export...",
icon: "download",
fillMode: "flat",
svgIcon: a,
onClick: r
}
);
};
s.displayName = "ExcelExport";
export {
s as ExcelExport
};