@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
15 lines (14 loc) • 538 B
TypeScript
import React, { ComponentType } from 'react';
export interface ImageLoaderProps {
url?: string;
onExternalImageLoaded?: (dimensions: {
width: number;
height: number;
}) => void;
imageStatus?: ImageStatus;
}
export interface ImageLoaderState {
imageStatus: ImageStatus;
}
export type ImageStatus = 'complete' | 'loading' | 'error';
export declare const withImageLoader: <P extends {}>(Wrapped: ComponentType<React.PropsWithChildren<P & ImageLoaderProps>>) => React.ComponentClass<P & ImageLoaderProps>;