react-movable-block-editor
Version:
React component for creating layouts and content via drag-and-drop blocks.
18 lines (17 loc) • 556 B
TypeScript
import { BlockProps } from '../blocks/BlockProps';
import { ReactElement } from 'react';
import { ById, BlockNode } from '../../data';
export interface BlockEditorValue {
byId: ById;
undoRedoVersion: number;
rootNodeId: string;
focusedNodeId: string | null;
copiedNode: BlockNode | null;
undoStack: Array<ById>;
redoStack: Array<ById>;
}
export interface BlockEditorProps {
value: BlockEditorValue;
onChange: (value: BlockEditorValue) => any;
renderEditBlock: (props: BlockProps) => ReactElement;
}