@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
20 lines (19 loc) • 829 B
TypeScript
import * as React from 'react';
import { FlexProps } from 'rebass';
interface FileDroppableProps extends FlexProps {
buttonText?: React.ReactNode;
fileAccept?: string;
icon?: React.ReactNode;
helpText?: React.ReactNode;
defaultText?: React.ReactNode;
loadingText?: React.ReactNode;
dragOverText?: React.ReactNode;
message?: React.ReactNode;
toJSON?: (str: string) => Promise<any> | any;
readFile?: (file: File, toJSON?: (str: string) => Promise<any> | any) => Promise<any>;
onDropSuccess?: (json: any, file: File) => void;
file?: File;
}
export declare const readJSONFile: (file: File, toJSON?: (str: string) => Promise<any> | any) => Promise<Record<string, unknown>[]>;
declare const FileDroppable: (props?: FileDroppableProps) => React.JSX.Element;
export default FileDroppable;