editor-react-parser
Version:
A renderer for editorjs block data for react
31 lines (30 loc) • 692 B
TypeScript
import React from "react";
import { OutputBlockData } from "../BlockParser";
/**
* Output of a image block
*/
export type EditorJsImage = {
file: {
url: string;
};
caption: string;
withBorder: boolean;
stretched: boolean;
withBackground: boolean;
};
export type ImageConfig = {
classNames?: {
container?: string;
image?: string;
};
dimensions?: {
width?: number | string;
height?: number | string;
};
};
export interface ImageProps {
item: OutputBlockData<EditorJsImage>;
config?: ImageConfig;
}
declare const ImageBlock: ({ item, config }: ImageProps) => React.JSX.Element;
export default ImageBlock;