Skip to content

Commit

Permalink
fix: cra example (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
echarles authored Jun 28, 2024
1 parent 1bb3620 commit d77442e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
8 changes: 4 additions & 4 deletions examples/cra/src/examples/cell/CellComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* MIT License
*/

import { selectCell, Cell } from "@datalayer/jupyter-react";
import { useCellStore, Cell } from "@datalayer/jupyter-react";
import CellToolbar from './CellToolbar';

const SOURCE_EXAMPLE = `"""
Expand Down Expand Up @@ -36,12 +36,12 @@ ax2.set_ylabel('Undamped')
plt.show()`;

const CellPreview = () => {
const cell = selectCell();
const cellStore = useCellStore();
return (
<>
<div>source: {cell.source}</div>
<div>source: {cellStore.source}</div>
<br/>
<div>kernel available: {String(cell.kernelAvailable)}</div>
<div>kernel available: {String(cellStore.kernelAvailable)}</div>
<br/>
</>
)
Expand Down
4 changes: 2 additions & 2 deletions examples/cra/src/examples/labapp/JupyterLabHeadlessApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ export const JupyterLabHeadlessAppExample = () => {
</div>
}
<JupyterLabApp
extensions={[
plugins={[
lightThemeExtension,
ipywidgetsExtension,
plotlyExtension,
]}
mimeExtensions={[
mimeRenderers={[
mimePlotlyExtension,
]}
headless={true}
Expand Down
19 changes: 1 addition & 18 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,24 +261,7 @@
"extension": "./lib/jupyter/lab/index.js",
"outputDir": "jupyter_react/labextension",
"schemaDir": "schema",
"webpackConfig": "./webpack.lab-config.js",
"sharedPackages": {
"@jupyter/web-components": {
"bundled": true,
"singleton": true
},
"@jupyter-notebook/tree": {
"singleton": true
},
"@microsoft/fast-element": {
"bundled": true,
"singleton": true
},
"@microsoft/fast-foundation": {
"bundled": true,
"singleton": true
}
}
"webpackConfig": "./webpack.lab-config.js"
},
"jupyter-releaser": {
"hooks": {
Expand Down

0 comments on commit d77442e

Please sign in to comment.