@konstructio/ui
Version:
A set of reusable and customizable React components built for konstruct.io
26 lines (25 loc) • 955 B
TypeScript
import { Props } from './ImageUpload.types';
/**
* A file input component for uploading images with preview and validation.
* Supports drag states, file type validation, size limits, and upload progress.
*
* @example
* ```tsx
* <ImageUpload
* label="Profile Picture"
* name="avatar"
* accept="image/png,image/jpeg"
* maxSize={5 * 1024 * 1024}
* uploadButtonText="Choose image"
* onChange={(e) => console.log(e.target.files?.[0])}
* onRemove={() => setAvatar(null)}
* />
* ```
*
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-imageupload--docs Storybook}
*/
declare const ImageUpload: {
({ className, error, fileName, fileSize, fileUrl, helperText, isRequired, label, labelClassName, labelWrapperClassName, name, onChange, onRemove, status, theme, uploadButtonText, accept, maxSize, }: Props): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export { ImageUpload };