amis-theme-editor
Version:
amis主题编辑器
60 lines (59 loc) • 1.48 kB
TypeScript
/**
* 主题编辑器
*/
import React from 'react';
import { ThemeDefinition } from 'amis-theme-editor-helper';
import '../renderers';
import '../renderers/style/_index.scss';
import '../scss/_index.scss';
export interface navListChild {
icon: any;
label: string;
key: string;
isSvg?: boolean;
}
export interface navListConfig {
label: string;
children: navListChild[];
}
export interface TabChild {
label: string;
key: string;
component: any;
}
export interface moreNavConfig {
globalStyleTab?: TabChild[];
componentStyleTab?: TabChild[];
customStyleTab?: TabChild[];
}
export interface ThemeEditorProps {
themeId?: string;
value: ThemeDefinition;
versionData: ThemeDefinition;
name: string;
moreNavConfig?: moreNavConfig;
actions?: any;
onChange: (value: ThemeDefinition) => void;
onSave: (value: ThemeDefinition) => Promise<boolean>;
onSaveDraft: (value: ThemeDefinition) => void;
onBack: () => void;
}
export interface ThemeEditorBodyBase {
data: ThemeDefinition;
setConfig: any;
onChange?: any;
activeId: string;
activeToken: string;
handleSetActiveToken: any;
handleCloseRightPanel: any;
refreshToken: string;
handleReFreshToken: (token: string) => void;
}
export declare const themeConfig: {
title: string;
path: string;
activeId: null;
body: any;
};
declare const ThemeEditor: React.FC<ThemeEditorProps>;
export default ThemeEditor;