UNPKG

1.36 kBTypeScriptView Raw
1import React from 'react';
2import type { ProSettings } from '../../defaultSettings';
3type MergerSettingsType<T> = Partial<T> & {
4 colorPrimary?: string;
5 colorWeak?: boolean;
6};
7export type SettingItemProps = {
8 title: React.ReactNode;
9 action: React.ReactElement;
10 disabled?: boolean;
11 disabledReason?: React.ReactNode;
12};
13export type SettingDrawerProps = {
14 defaultSettings?: MergerSettingsType<ProSettings>;
15 settings?: MergerSettingsType<ProSettings>;
16 collapse?: boolean;
17 onCollapseChange?: (collapse: boolean) => void;
18 getContainer?: any;
19 hideHintAlert?: boolean;
20 hideCopyButton?: boolean;
21 /** 使用实验性质的黑色主题 */
22 enableDarkTheme?: boolean;
23 prefixCls?: string;
24 colorList?: false | {
25 key: string;
26 color: string;
27 title?: string;
28 }[];
29 onSettingChange?: (settings: MergerSettingsType<ProSettings>) => void;
30 pathname?: string;
31 disableUrlParams?: boolean;
32 themeOnly?: boolean;
33};
34export type SettingDrawerState = {
35 collapse?: boolean;
36 language?: string;
37} & MergerSettingsType<ProSettings>;
38export declare const getFormatMessage: () => (data: {
39 id: string;
40 defaultMessage?: string;
41}) => string;
42/**
43 * 可视化配置组件
44 *
45 * @param props
46 */
47export declare const SettingDrawer: React.FC<SettingDrawerProps>;
48export {};