UNPKG

@logicflow/dumi-theme-simple

Version:
63 lines (62 loc) 1.25 kB
import React from 'react'; export type CodeEditorProps = { /** * 标题 */ title?: string; /** * 示例的 id */ exampleId: string; /** * 输入的源码 */ source: string; /** * 相对地址 */ relativePath?: string; /** * 是否全屏状态 */ isFullscreen?: boolean; /** * 在一个文档中有多个 DEMO 的时候,需要有不同的 dom id */ replaceId?: string; /** * 点击全屏按钮 */ onFullscreen: (isFullScreen: boolean) => void; /** * 初始化 */ onReady: () => void; /** * 销毁 */ onDestroy: () => void; /** * 执行出错的时候,回调,方便上层做显示 */ onError: (e: any) => void; /** * playground 的一些配置 */ playground: { container?: string; playgroundDidMount?: string; playgroundWillUnmount?: string; dependencies?: { [key: string]: string; }; devDependencies?: { [key: string]: string; }; htmlCodeTemplate?: string; }; }; /** * 代码编辑器 */ export declare const CodeEditor: React.FC<CodeEditorProps>;