@trussworks/react-uswds
Version:
React USWDS 3 component library
21 lines (20 loc) • 746 B
TypeScript
import { default as React, JSX } from 'react';
export type FileInputProps = {
id: string;
name: string;
dragText?: string;
chooseText?: string;
errorText?: string;
disabled?: boolean;
multiple?: boolean;
accept?: string;
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
onDrop?: (e: React.DragEvent) => void;
} & JSX.IntrinsicElements['input'];
export type FileInputRef = {
clearFiles: () => void;
input: HTMLInputElement | null;
files: File[];
};
export declare const FileInputForwardRef: React.ForwardRefRenderFunction<FileInputRef, FileInputProps>;
export declare const FileInput: React.ForwardRefExoticComponent<Omit<FileInputProps, "ref"> & React.RefAttributes<FileInputRef>>;