How to use the @lumino/widgets.DockPanel.Renderer function in @lumino/widgets

To help you get started, we’ve selected a few @lumino/widgets examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / packages / ui-components / src / icon / tabbarsvg.ts View on Github external
}
}

export namespace DockPanelSvg {
  export interface IOptions extends DockPanel.IOptions {
    /**
     * The kind of icon this dock panel widget should render.
     * Adds preset styling to the icons.
     */
    kind?: IconKindType;
  }

  /**
   * A modified implementation of the DockPanel Renderer.
   */
  export class Renderer extends DockPanel.Renderer {
    constructor(kind?: IconKindType) {
      super();
      this._kind = kind;
    }

    /**
     * Create a new tab bar (with inline svg icons enabled
     * for use with a dock panel.
     *
     * @returns A new tab bar for a dock panel.
     */
    createTabBar(): TabBarSvg {
      let bar = new TabBarSvg({
        kind: this._kind
      });
      bar.addClass('p-DockPanel-tabBar');