reactfire
Version:
Firebase library for React
27 lines (26 loc) • 1.17 kB
TypeScript
import firebase from 'firebase/app';
import * as React from 'react';
import { ReactFireOptions, ObservableStatus } from './';
/**
* Subscribe to the progress of a storage task
*
* @param task - the task you want to listen to
* @param ref - reference to the blob the task is acting on
* @param options
*/
export declare function useStorageTask<T = unknown>(task: firebase.storage.UploadTask, ref: firebase.storage.Reference, options?: ReactFireOptions<T>): ObservableStatus<firebase.storage.UploadTaskSnapshot | T>;
/**
* Subscribe to a storage ref's download URL
*
* @param ref - reference to the blob you want to download
* @param options
*/
export declare function useStorageDownloadURL<T = string>(ref: firebase.storage.Reference, options?: ReactFireOptions<T>): ObservableStatus<string | T>;
declare type StorageImageProps = {
storagePath: string;
storage?: firebase.storage.Storage;
suspense?: boolean;
placeHolder?: JSX.Element;
};
export declare function StorageImage(props: StorageImageProps & React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>): JSX.Element;
export {};