-
Notifications
You must be signed in to change notification settings - Fork 152
/
page-settings.ts
55 lines (53 loc) · 2.05 KB
/
page-settings.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
/********************************************************************************
* Copyright (c) 2020 TypeFox and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
import { ComponentType, ReactNode } from 'react';
import { SxProps, Theme } from '@mui/material/styles';
import { Extension, NamespaceDetails } from './extension-registry-types';
import { Cookie } from './utils';
export interface PageSettings {
pageTitle: string;
themeType?: 'light' | 'dark';
elements: {
toolbarContent?: ComponentType;
defaultMenuContent?: ComponentType;
mobileMenuContent?: ComponentType;
footer?: {
content: ComponentType<{ expanded: boolean }>;
props: {
footerHeight?: number
}
};
searchHeader?: ComponentType;
reportAbuse?: ComponentType<{ extension: Extension, sx?: SxProps<Theme> }>;
claimNamespace?: ComponentType<{ extension: Extension, sx?: SxProps<Theme> }>;
downloadTerms?: ComponentType;
additionalRoutes?: ReactNode;
banner?: {
content: ComponentType;
props?: {
dismissButton?: {
show?: boolean,
label?: string
},
onClose?: () => void,
color?: 'info' | 'warning'
},
cookie?: Cookie
};
mainHeadTags?: ComponentType<{ pageSettings: PageSettings }>;
extensionHeadTags?: ComponentType<{ extension?: Extension, pageSettings: PageSettings }>;
namespaceHeadTags?: ComponentType<{ namespaceDetails?: NamespaceDetails, name: string, pageSettings: PageSettings }>;
};
urls: {
extensionDefaultIcon: string;
namespaceAccessInfo: string;
publisherAgreement?: string;
};
}