-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
Copy pathindex.ts
41 lines (38 loc) · 1.09 KB
/
index.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
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
/**
* @packageDocumentation
* @module theme-light-extension
*/
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import { IThemeManager } from '@jupyterlab/apputils';
import { ITranslator } from '@jupyterlab/translation';
/**
* A plugin for the Jupyter Light Theme.
*/
const plugin: JupyterFrontEndPlugin<void> = {
id: '@jupyterlab/theme-light-extension:plugin',
description: 'Adds a light theme.',
requires: [IThemeManager, ITranslator],
activate: (
app: JupyterFrontEnd,
manager: IThemeManager,
translator: ITranslator
) => {
const trans = translator.load('jupyterlab');
const style = '@jupyterlab/theme-light-extension/index.css';
manager.register({
name: 'JupyterLab Light',
displayName: trans.__('JupyterLab Light'),
isLight: true,
themeScrollbars: false,
load: () => manager.loadCSS(style),
unload: () => Promise.resolve(undefined)
});
},
autoStart: true
};
export default plugin;