Skip to content

Commit 0b74021

Browse files
FIREFLY-1349: Add firefly logo as LabIcon
1 parent 196f502 commit 0b74021

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/SlateCommandExt.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import { Widget } from '@lumino/widgets';
22
import { ICommandPalette, IFrame } from '@jupyterlab/apputils';
33
import { JupyterFrontEnd } from '@jupyterlab/application';
44
import { ILauncher } from '@jupyterlab/launcher';
5+
import { LabIcon } from '@jupyterlab/ui-components';
56

67
import { findFirefly } from './FireflyCommonUtils.js';
8+
import fireflyIconStr from '../style/fftools-logo.svg';
79

810

911
let widgetId;
@@ -35,10 +37,15 @@ export function activateSlateCommandExt(app, palette, launcher) {
3537
// for starting extension as a jupyter command -----------
3638
const command = 'firefly:open-slate';
3739
const category = 'Firefly';
40+
const icon = new LabIcon({
41+
name: 'jupyter_firefly_extensions:firefly-icon',
42+
svgstr: fireflyIconStr
43+
});
3844

3945
app.commands.addCommand(command, {
4046
label: 'Open Firefly',
4147
caption: 'Open Firefly',
48+
icon: icon,
4249
isEnabled: () => true,
4350
execute: () => {
4451
const id= 'slate-'+ widgetCnt;

src/svg.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.svg' {
2+
const value: string;
3+
export default value;
4+
}

0 commit comments

Comments
 (0)