UNPKG

@siamf/react-export

Version:

A React package that simplifies data exporting and clipboard management. It provides react component for printing documents, exporting data as PDF, Excel, and CSV, as well as copying text and structured data to the clipboard.

23 lines (22 loc) 694 B
export interface ExportInterface { dragProps: { onDrop: (e: any) => void; onDragEnter: (e: any) => void; onDragLeave: (e: any) => void; onDragOver: (e: any) => void; onDragStart: (e: any) => void; }; isDragging: boolean; onFileUpload: () => void; data: Array<any> | undefined; file: File | null; error: boolean; } export interface Props { onRead: (data: Array<any>) => void; value?: Array<any>; children: (props: ExportInterface) => React.ReactNode; inputProps?: React.HTMLProps<HTMLInputElement>; onChange?: (file: File | null) => void; } export type ReadData = Record<string, string | number | boolean>;