Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
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);
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];
}