-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy paththeme-modules.d.ts
More file actions
62 lines (49 loc) · 1.63 KB
/
theme-modules.d.ts
File metadata and controls
62 lines (49 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
declare module 'dumi/theme/slots/*' {
import type { ComponentType } from 'react';
const component: ComponentType<any>;
export default component;
}
declare module 'dumi/theme/builtins/*' {
import type { ComponentType } from 'react';
const component: ComponentType<any>;
export default component;
}
declare module 'dumi/theme/builtins/SourceCode' {
import type { ComponentType, ReactNode } from 'react';
export interface ISourceCodeProps {
children?: string;
lang?: string;
textarea?: ReactNode;
extra?: ReactNode;
[key: string]: any;
}
const SourceCode: ComponentType<ISourceCodeProps>;
export default SourceCode;
}
declare module 'dumi/theme/slots/ContentTabs' {
import type { IRouteMeta } from 'dumi';
import type { ComponentType } from 'react';
type IContentTabs = IRouteMeta['tabs'];
export interface IContentTabsProps {
tabs: IContentTabs;
tabKey: string | null;
onChange: (tab?: NonNullable<IContentTabs>[0]) => void;
}
const ContentTabs: ComponentType<IContentTabsProps>;
export default ContentTabs;
}
declare module 'dumi/theme/slots/SourceCodeEditor' {
import type { ISourceCodeProps } from 'dumi/theme/builtins/SourceCode';
import type { ComponentType, ReactNode } from 'react';
export interface ISourceCodeEditorProps
extends Omit<ISourceCodeProps, 'children'> {
initialValue: string;
onTranspile?: (
args: { err: Error; code?: null } | { err?: null; code: string },
) => void;
onChange?: (code: string) => void;
extra?: ReactNode;
}
const SourceCodeEditor: ComponentType<ISourceCodeEditorProps>;
export default SourceCodeEditor;
}