import React, { RefObject } from 'react'; declare type FunctionType = (progress: number) => void; declare type UploaderExtraInfo = { complete: number; started: boolean; }; export interface UploaderRef { updateProgress: FunctionType; progressRef: RefObject<[HTMLDivElement | null, UploaderExtraInfo]>; uploadComplete: () => void; uploadReset: () => void; } /** * This component will return Container with absolute position * Wrapper this component with position relative and it will occupy full space of the parent * Component will render UI only when upload start * You need to map your reference to the component instance * { yourRefObject.current = instance; }} /> * You'll get access to UploaderRef (check above) * Note that this is ref based component * So any changes in this component will not affect re-rendering on your parent component */ declare const Uploader: React.ForwardRefExoticComponent>; export default Uploader;