EmptyWidget.js 621 B

12345
  1. export default class EmptyWidget extends UI.VBox{constructor(text){super();this.registerRequiredCSS('ui/emptyWidget.css');this.element.classList.add('empty-view-scroller');this._contentElement=this.element.createChild('div','empty-view');this._textElement=this._contentElement.createChild('div','empty-bold-text');this._textElement.textContent=text;}
  2. appendParagraph(){return this._contentElement.createChild('p');}
  3. appendLink(link){return this._contentElement.appendChild(UI.XLink.create(link,'Learn more'));}
  4. set text(text){this._textElement.textContent=text;}}
  5. self.UI=self.UI||{};UI=UI||{};UI.EmptyWidget=EmptyWidget;