Skip to content

Commit 549c20a

Browse files
committed
Improve styling in about dialog
1 parent 012b7d2 commit 549c20a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/completion-theme/src/about.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { ReactElement } from 'react';
2-
import { ICompletionTheme, ILicenseInfo } from './types';
2+
import { ICompletionTheme, ILicenseInfo, COMPLETER_THEME_PREFIX } from './types';
33
import { LabIcon } from '@jupyterlab/ui-components';
44

55
function render_licence(licence: ILicenseInfo): ReactElement {
@@ -32,7 +32,7 @@ function render_theme(
3232
);
3333
}
3434
return (
35-
<div className={'lsp-completer-themes'}>
35+
<div className={'lsp-completer-themes ' + COMPLETER_THEME_PREFIX + theme.id}>
3636
<h4>
3737
{theme.name}
3838
{is_current ? ' (current)' : ''}

packages/completion-theme/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
ICompletionIconSet,
1111
ICompletionTheme,
1212
ILSPCompletionThemeManager,
13-
PLUGIN_ID
13+
PLUGIN_ID,
14+
COMPLETER_THEME_PREFIX
1415
} from './types';
1516
import { render_themes_list } from './about';
1617
import '../style/index.css';
@@ -91,7 +92,7 @@ export class CompletionThemeManager implements ILSPCompletionThemeManager {
9192
}
9293

9394
protected get current_theme_class() {
94-
return 'lsp-completer-theme-' + this.current_theme_id;
95+
return COMPLETER_THEME_PREFIX + this.current_theme_id;
9596
}
9697

9798
set_theme(id: string | null) {

packages/completion-theme/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Token } from '@lumino/coreutils';
22
import { LabIcon } from '@jupyterlab/ui-components';
33

4+
export const COMPLETER_THEME_PREFIX = 'lsp-completer-theme-';
5+
46
// TODO, once features are extracted to standalone packages,
57
// import the CompletionItemKindStrings from @feature-completer
68
enum CompletionItemKind {

0 commit comments

Comments
 (0)