@datalayer/core
Version:
**Datalayer Core**
17 lines (16 loc) • 632 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the Modified BSD License.
*/
import { Button } from '@primer/react';
import { DownloadIcon } from '@primer/octicons-react';
import { downloadCSV } from '../../utils';
export const DownloadCSVButton = (props) => {
const { data, fileName, variant } = props;
return (_jsx(Button, { variant: variant, leadingVisual: DownloadIcon, onClick: e => downloadCSV(data, fileName), children: "Download" }));
};
DownloadCSVButton.defaultProps = {
variant: "default",
};
export default DownloadCSVButton;