UNPKG

@simuratli/react-json-csv-converter

Version:
22 lines (19 loc) 598 B
import React, { ButtonHTMLAttributes, ReactNode } from 'react'; interface JsonObject { [key: string]: any; } interface CsvHeader { label: string; key: string; } interface JsonToCsvDownloadProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> { data: JsonObject[]; headers?: CsvHeader[] | null; filename?: string; className?: string; children?: ReactNode; onDownload?: () => void; } declare const JsonToCsvDownload: React.FC<JsonToCsvDownloadProps>; export { JsonToCsvDownload }; export type { CsvHeader, JsonObject, JsonToCsvDownloadProps };