index.js 715 B

123456789101112131415161718192021222324
  1. // Copyright (c) Jupyter Development Team.
  2. // Distributed under the terms of the Modified BSD License.
  3. import { Widget } from '@phosphor/widgets';
  4. import { MainAreaWidget } from '@jupyterlab/apputils';
  5. const plugins = [
  6. {
  7. id: '@jupyterlab/example-federated-phosphor',
  8. autoStart: true,
  9. activate: function (app) {
  10. const mywidget = new Widget();
  11. mywidget.node.textContent = 'Phosphor extension';
  12. mywidget.id = '@jupyterlab/example-federated-phosphor';
  13. mywidget.title.label = 'Phosphor extension';
  14. const appwidget = new MainAreaWidget({ content: mywidget });
  15. app.restored.then(() => {
  16. app.shell.add(appwidget);
  17. });
  18. }
  19. }
  20. ];
  21. export default plugins;