diff --git a/src/index.ts b/src/index.ts index 3a6a057..086651d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,10 +45,10 @@ const plugin: JupyterFrontEndPlugin = { const webDavIcon = new LabIcon({ name: 'ui-components:webdav-icon', svgstr: Icon}); const label = "Data Pool" - const content = new DataPoolWidget(); + const content = new DataPoolWidget(label); const widget = new MainAreaWidget({content}); widget.id = 'jupyterlab-data-pool:plugin'; - widget.title.label = 'Data Pool'; + widget.title.label = label widget.title.closable = true; widget.title.icon = webDavIcon diff --git a/src/widget.tsx b/src/widget.tsx index 54d5358..aa3e6e0 100644 --- a/src/widget.tsx +++ b/src/widget.tsx @@ -9,23 +9,25 @@ const divStyle = { }; export class DataPoolWidget extends ReactWidget { - applicationName: string = '' - constructor() { + applicationName = "" + constructor(label: string) { super(); - this.applicationName = "Data Pool" + this.applicationName = label } render(): JSX.Element { - return (
); + return (
); } } +interface LayoutProps { + label: string +}; - -const TmpLayout = () => { +const TmpLayout = (props: LayoutProps) => { return ( -

Data Pool

+

{props.label}