UNPKG

@voila-dashboards/jupyterlab-gridstack

Version:

A gridstack-based template for [![voila-gridstack](assets/voila.png)](https://github.com/voila-dashboards/voila).

19 lines (18 loc) 573 B
import { ReactWidget, ToolbarButtonComponent } from '@jupyterlab/apputils'; import { saveIcon } from '@jupyterlab/ui-components'; import * as React from 'react'; /** * A toolbar widget to save the dashboard metadata. */ export default class Save extends ReactWidget { constructor(panel) { super(); this._panel = panel; } render() { const onClick = () => { this._panel.save(); }; return (React.createElement(ToolbarButtonComponent, { icon: saveIcon, onClick: onClick, tooltip: 'Save the layout' })); } }