How to use the @jupyterlab/ui-components.defaultIconRegistry.icon function in @jupyterlab/ui-components

To help you get started, we’ve selected a few @jupyterlab/ui-components 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 / celltags / src / addwidget.ts View on Github external
buildTag() {
    let text = document.createElement('input');
    text.value = 'Add Tag';
    text.contentEditable = 'true';
    text.className = 'add-tag';
    text.style.width = '49px';
    this.input = text;
    let tag = document.createElement('div');
    tag.className = 'tag-holder';
    tag.appendChild(text);
    let img = document.createElement('span');
    defaultIconRegistry.icon({
      name: 'add',
      container: img,
      center: true,
      height: '18px',
      width: '18px',
      marginLeft: '3px',
      marginRight: '-5px'
    });
    this.addClass('unapplied-tag');
    tag.appendChild(img);
    this.node.appendChild(tag);
  }
github jupyterlab / jupyterlab / packages / celltags / src / widget.ts View on Github external
buildTag() {
    let text = document.createElement('span');
    text.textContent = this.name;
    text.style.textOverflow = 'ellipsis';
    let tag = document.createElement('div');
    tag.className = 'tag-holder';
    tag.appendChild(text);
    let img = document.createElement('span');
    defaultIconRegistry.icon({
      name: 'check',
      container: img,
      center: true,
      height: '18px',
      width: '18px',
      marginLeft: '5px',
      marginRight: '-3px'
    });
    if (this.applied) {
      this.addClass('applied-tag');
    } else {
      this.addClass('unapplied-tag');
      img.style.display = 'none';
    }
    tag.appendChild(img);
    this.node.appendChild(tag);
github jupyterlab / jupyterlab / packages / filebrowser / src / crumbs.ts View on Github external
export function createCrumbs(): ReadonlyArray {
    let home = document.createElement('span');
    defaultIconRegistry.icon({
      name: BREADCRUMB_HOME,
      className: BREADCRUMB_HOME_CLASS,
      container: home,
      kind: 'breadCrumb'
    });
    home.title = PageConfig.getOption('serverRoot') || 'Jupyter Server Root';
    let ellipsis = document.createElement('span');
    ellipsis.className =
      MATERIAL_CLASS + ' ' + BREADCRUMB_ELLIPSES + ' ' + BREADCRUMB_ITEM_CLASS;
    let parent = document.createElement('span');
    parent.className = BREADCRUMB_ITEM_CLASS;
    let current = document.createElement('span');
    current.className = BREADCRUMB_ITEM_CLASS;
    return [home, ellipsis, parent, current];
  }

@jupyterlab/ui-components

JupyterLab - UI components written in React

BSD-3-Clause
Latest version published 2 days ago

Package Health Score

95 / 100
Full package analysis

Similar packages