UNPKG

react-blocks-editor

Version:

Embed the Blocks Editor anywhere using a React component.

33 lines (32 loc) 943 B
declare type Node = any; export interface EditorState { name: string; description: string; version: string; language: string; output: string; nodes: Record<string, Node>; } interface LocalMessage { type: 'load'; state: Partial<EditorState>; } interface LoadArgs { sendMessage: (message: LocalMessage) => void; loadState: (state: Partial<EditorState>) => void; } interface QueryOptions { menu: 'hidden' | 'load' | 'tutorials' | 'settings' | 'social'; theme: 'dark' | 'grey'; familiarity: boolean | string; tutorial: string; } export interface EditorPropTypes { url?: string; onSave?: (state: EditorState) => void; options?: Partial<QueryOptions>; children?: (args: LoadArgs) => void; [x: string]: any; } export declare const BlocksEditor: ({ url, onSave, options, style, children, ...rest }: EditorPropTypes) => JSX.Element; export {};