forked from hopinc/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.ts
70 lines (68 loc) · 1.87 KB
/
theme.ts
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
63
64
65
66
67
68
69
70
import React from 'react';
export type Renderable = string | React.ReactNode | React.ComponentType;
/**
* nextra-theme-docs Theme config
* @link https://github.com/shuding/nextra/blob/core/packages/nextra-theme-docs/src/types.ts
*/
export interface DocsThemeConfig {
docsRepositoryBase?: string;
titleSuffix?:
| string
| React.FC<{
locale: string;
config: DocsThemeConfig;
title: string;
meta: Record<string, any>;
}>;
nextLinks?: boolean;
prevLinks?: boolean;
search?: boolean;
darkMode?: boolean;
/**
* A subset of configurations for https://github.com/pacocoursey/next-themes#themeprovider
* - defaultTheme
* - storageKey
* - forcedTheme
*/
nextThemes?: object;
defaultMenuCollapsed?: boolean;
font?: boolean;
footer?: boolean;
footerText?: Renderable;
footerEditLink?: Renderable;
feedbackLink?: Renderable;
feedbackLabels?: string;
head?:
| React.ReactNode
| React.FC<{
locale: string;
config: DocsThemeConfig;
title: string;
meta: Record<string, any>;
}>;
logo?: Renderable;
direction?: string;
i18n?: {locale: string; text: string; direction: string}[];
customSearch?: boolean;
searchPlaceholder?: string | ((props: {locale?: string}) => string);
projectLink?: string;
github?: string;
projectLinkIcon?: React.FC<{locale: string}>;
projectChatLink?: string;
projectChatLinkIcon?: React.FC<{locale: string}>;
floatTOC?: boolean;
banner?: React.FC<{locale: string}>;
bannerKey?: string;
gitTimestamp?: string | React.FC<{locale: string; timestamp: Date}>;
tocExtraContent?: React.FC<{locale: string}>;
unstable_faviconGlyph?: string;
unstable_flexsearch?: boolean;
unstable_searchResultEmpty?:
| React.ReactNode
| React.FC<{
locale: string;
config: DocsThemeConfig;
title: string;
meta: Record<string, any>;
}>;
}