How to use the @jupyterlab/ui-components.defaultIconRegistry.contains 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 / settingeditor / src / pluginlist.tsx View on Github external
const image = getHint(ICON_CLASS_KEY, registry, plugin);
      const iconClass = combineClasses(
        image,
        'jp-PluginList-icon',
        'jp-MaterialIcon'
      );
      const iconTitle = getHint(ICON_LABEL_KEY, registry, plugin);

      return (
        <li title="{itemTitle}" data-id="{id}" selection="">
          {defaultIconRegistry.contains(image) ? (
            
          ) : (
            <span title="{iconTitle}">
          )}
          <span>{schema.title || id}</span>
        </span></li>
      );
    });
github jupyterlab / jupyterlab / packages / launcher / src / index.tsx View on Github external
orderedCategories.forEach(cat =&gt; {
      const item = categories[cat][0] as ILauncher.IItemOptions;
      let iconClass = this._commands.iconClass(item.command, {
        ...item.args,
        cwd: this.cwd
      });
      let kernel = KERNEL_CATEGORIES.indexOf(cat) &gt; -1;
      if (cat in categories) {
        section = (
          <div>
            <div>
              {kernel &amp;&amp; defaultIconRegistry.contains(iconClass) ? (
                
              ) : (
                <div>
              )}
              <h2>{cat}</h2></div></div></div>

@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