infinity-ui-elements
Version:
A React TypeScript component library with Tailwind CSS design system
49 lines • 1.78 kB
TypeScript
import * as React from "react";
declare const uploadBoxVariants: (props?: ({
size?: "medium" | "large" | "small" | null | undefined;
validationState?: "none" | "positive" | "negative" | null | undefined;
isDisabled?: boolean | null | undefined;
isDragging?: boolean | null | undefined;
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
export interface UploadedFile {
file?: File;
url?: string;
name?: string;
size?: number;
preview?: string;
id: string;
}
export interface UploadBoxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
label?: string;
helperText?: string;
errorText?: string;
successText?: string;
size?: "small" | "medium" | "large";
validationState?: "none" | "positive" | "negative";
isDisabled?: boolean;
isRequired?: boolean;
isOptional?: boolean;
accept?: string;
multiple?: boolean;
maxSize?: number;
maxFiles?: number;
value?: File | File[] | UploadedFile | UploadedFile[] | string | string[];
onChange?: (files: File | File[] | null) => void;
onFileRemove?: (file: File | UploadedFile) => void;
containerClassName?: string;
labelClassName?: string;
uploadAreaClassName?: string;
previewClassName?: string;
infoHeading?: string;
infoDescription?: string;
LinkComponent?: React.ReactNode;
linkText?: string;
linkHref?: string;
onLinkClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
uploadText?: string;
dragText?: string;
showPreview?: boolean;
}
declare const UploadBox: React.ForwardRefExoticComponent<UploadBoxProps & React.RefAttributes<HTMLDivElement>>;
export { UploadBox, uploadBoxVariants };
//# sourceMappingURL=UploadBox.d.ts.map