Skip to content

Commit

Permalink
Merge pull request #132 from fcollonval/ft/apply-jp-theme-to-primer-r…
Browse files Browse the repository at this point in the history
…eact

First iteration to sync primer react with JupyterLab theme
  • Loading branch information
echarles authored Dec 15, 2023
2 parents 1e00076 + 2719398 commit f9091ad
Show file tree
Hide file tree
Showing 3 changed files with 598 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"@jupyterlab/translation-extension": "4.0.3",
"@jupyterlab/ui-components-extension": "4.0.3",
"@lumino/default-theme": "2.1.2",
"@primer/react": "0.0.0-20230912151940",
"assert": "2.0.0",
"bufferutil": "4.0.7",
"codemirror": "6.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/jupyter/Jupyter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import JupyterLabCss from './lab/JupyterLabCss';
import { getJupyterServerHttpUrl, getJupyterServerWsUrl, loadJupyterConfig } from './JupyterConfig';
import defaultInjectableStore, { InjectableStore } from '../state/redux/Store';
import { JupyterLabTheme } from "./lab/JupyterLabTheme";
import defaultTheme from './theme';

/**
* Definition of the properties that can be passed
Expand Down Expand Up @@ -67,7 +68,7 @@ export const Jupyter = (props: JupyterProps) => {
FallbackComponent={ErrorFallback}
onReset={() => { console.log('Error Boundary reset has been invoked...'); }}
>
<ThemeProvider colorMode={theme === 'light' ? "day" : "night"} dayScheme="light" nightScheme="dark_high_contrast">
<ThemeProvider theme={defaultTheme} colorMode={theme === 'light' ? 'day' : 'night'} dayScheme='jupyter' nightScheme='jupyter'>
<BaseStyles>
<Box color="fg.default" bg="canvas.default">
{ !config.insideJupyterLab && !disableCssLoading && <JupyterLabCss theme={theme}/> }
Expand Down
Loading

0 comments on commit f9091ad

Please sign in to comment.