File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ class CellSidebarFactory implements IDisposable {
32
32
protected panel : NotebookPanel ,
33
33
protected commands : CommandRegistry ,
34
34
protected nbgrader : boolean = false ,
35
- protected sidebarWidth : number = 120
35
+ protected sidebarWidth : number = 120 ,
36
+ protected factory : React . JSXElementConstructor < ICellSidebarProps > = CellSidebar
36
37
) {
37
38
this . _onModelChanged ( panel . content ) ;
38
39
panel . content . modelChanged . connect ( this . _onModelChanged , this ) ;
@@ -59,9 +60,10 @@ class CellSidebarFactory implements IDisposable {
59
60
private _addSidebar ( model : ICellModel ) : void {
60
61
const cell = this . _getCell ( model ) ;
61
62
if ( cell ) {
63
+ const Element = this . factory ;
62
64
const sidebar = ReactWidget . create (
63
65
< JupyterReactTheme >
64
- < CellSidebar
66
+ < Element
65
67
commands = { this . commands }
66
68
model = { model }
67
69
nbgrader = { this . nbgrader }
@@ -155,7 +157,8 @@ export class CellSidebarExtension implements DatalayerNotebookExtension {
155
157
panel ,
156
158
this . commands ! ,
157
159
this . nbgrader ,
158
- this . sidebarWidth
160
+ this . sidebarWidth ,
161
+ this . factory
159
162
) ;
160
163
return sidebar ;
161
164
}
You can’t perform that action at this time.
0 commit comments