UNPKG

@logicflow/dumi-theme-simple

Version:
73 lines (72 loc) 1.6 kB
import React, { ReactElement } from 'react'; export declare enum EDITOR_TABS { JAVASCRIPT = "JavaScript", SPEC = "Spec", DATA = "Data" } type ToolbarProps = { /** * 源码文件,用于传入到三方代码平台 */ sourceCode: string; /** * 生成代码文件名后缀,用于传入到三方代码平台 */ fileExtension: string; /** * 项目标题,用于传入到三方代码平台 */ title: { zh?: string; en?: string; } | string; location?: Location; /** * playground 的一些配置项 */ playground: { container?: string; playgroundDidMount?: string; playgroundWillUnmount?: string; dependencies?: { [key: string]: string; }; devDependencies?: { [key: string]: string; }; htmlCodeTemplate?: string; json?: { [key: string]: any; }; }; /** * 全屏状态,用于显示不同的 icon */ isFullScreen?: boolean; /** * Tabs 数据 */ editorTabs: EDITOR_TABS[]; /** * 当前编辑哪个 tab */ currentEditorTab: EDITOR_TABS; /** * 切换 tab */ onEditorTabChange: (tab: EDITOR_TABS) => void; /** * 进入/退出全屏 */ onToggleFullscreen?: null | (() => void); /** * 执行代码 */ onExecuteCode: () => void; /** * Tab 的附加内容 */ slots: Record<string, ReactElement>; }; export declare const Toolbar: React.FC<ToolbarProps>; export {};