Add top bar in standalone gallery and notebook viewer (#76)

* Add top bar in standalone gallery

* Address review comments
This commit is contained in:
Tanuj Mittal
2020-07-08 12:40:47 -07:00
committed by GitHub
parent 955d08e4d0
commit 5a1dd42395
9 changed files with 92 additions and 106 deletions

View File

@@ -1,11 +0,0 @@
@import "../../../../less/Common/Constants";
.notebookComponentContainer {
height: 100vh;
width: 100vw;
margin: 0px;
overflow-x: hidden;
font-family: @DataExplorerFont;
padding: 20px;
}

View File

@@ -9,6 +9,7 @@ import {
} from "../Explorer/Controls/NotebookViewer/NotebookViewerComponent";
import { IGalleryItem, JunoClient } from "../Juno/JunoClient";
import * as GalleryUtils from "../Utils/GalleryUtils";
import { GalleryHeaderComponent } from "../Explorer/Controls/Header/GalleryHeaderComponent";
const onInit = async () => {
initializeIcons();
@@ -38,7 +39,18 @@ const render = (notebookUrl: string, backNavigationText: string, galleryItem?: I
onTagClick: undefined
};
ReactDOM.render(<NotebookViewerComponent {...props} />, document.getElementById("notebookContent"));
const element = (
<>
<header>
<GalleryHeaderComponent />
</header>
<div style={{ marginLeft: 120, marginRight: 120 }}>
<NotebookViewerComponent {...props} />
</div>
</>
);
ReactDOM.render(element, document.getElementById("notebookContent"));
};
// Entry point