Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createWrapper(content: Widget, title: string): Widget {
let wrapper = new StackedPanel();
wrapper.addClass('content-wrapper');
wrapper.addWidget(content);
wrapper.title.label = title;
return wrapper;
}
constructor() {
this._sideBar = new TabBarSvg({
kind: 'sideBar',
insertBehavior: 'none',
removeBehavior: 'none',
allowDeselect: true
});
this._stackedPanel = new StackedPanel();
this._sideBar.hide();
this._stackedPanel.hide();
this._lastCurrent = null;
this._sideBar.currentChanged.connect(this._onCurrentChanged, this);
this._sideBar.tabActivateRequested.connect(
this._onTabActivateRequested,
this
);
this._stackedPanel.widgetRemoved.connect(this._onWidgetRemoved, this);
}