UNPKG

@trussworks/react-uswds

Version:
24 lines (23 loc) 873 B
import { default as React, JSX } from 'react'; export type FileInputProps = { id: string; name: string; dragText?: string; chooseText?: string; errorText?: string; previewSingleSelectedFileText?: string; previewMultipleSelectedFileText?: string; changeSelectedFileText?: 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>>;