Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Dou Du committed May 26, 2024
1 parent 843b7df commit 86ca361
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ const plugin: JupyterFrontEndPlugin<void> = {
label: 'MOs Visualizer',
icon: molIcon,
execute: () => {
let theme: string = 'dark'
if (themeManager.theme?.toLowerCase().includes('light')) { theme = 'light'; }
else { theme = 'dark'; };
let theme: string = 'dark';

Check failure on line 44 in src/index.ts

View workflow job for this annotation

GitHub Actions / build

Type string trivially inferred from a string literal, remove type annotation
if (themeManager.theme?.toLowerCase().includes('light')) {
theme = 'light';
} else {
theme = 'dark';
}

const content = new CounterWidget(browserFactory, theme);
const widget = new MainAreaWidget<CounterWidget>({ content });
Expand Down
2 changes: 1 addition & 1 deletion src/sliders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function VerticalSlider(Props: INglProps) {
const classes = useStyles();

// const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
const prefersDarkMode = Props.theme === 'dark' ? true:false;
const prefersDarkMode = Props.theme === 'dark' ? true : false;

const theme = React.useMemo(
() =>
Expand Down
6 changes: 3 additions & 3 deletions src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module '*.svg' {
const script: string;
export default script;
}
const script: string;
export default script;
}
1 change: 0 additions & 1 deletion src/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ export class CounterWidget extends ReactWidget {
}}
/>


<Grid container spacing={3} justifyContent="center">
<Grid item sm={3}>
<Inputs
Expand Down
4 changes: 3 additions & 1 deletion ui-tests/tests/jupyterlab_mol_visualizer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ test('should emit an activation console message', async ({ page }) => {
await page.goto();

expect(
logs.filter(s => s === 'JupyterLab extension jupyterlab_mol_visualizer is activated!')
logs.filter(
s => s === 'JupyterLab extension jupyterlab_mol_visualizer is activated!'
)
).toHaveLength(1);
});

0 comments on commit 86ca361

Please sign in to comment.