Move helper functions into DOM (#10051)

* Move helper functions into DOM

* Add tests and comments
This commit is contained in:
Charles Gagnon
2020-04-17 13:21:35 -07:00
committed by GitHub
parent b02a5f9e49
commit ea310ff15d
17 changed files with 141 additions and 107 deletions

View File

@@ -16,6 +16,7 @@ import { attachCheckboxStyler } from 'sql/platform/theme/common/styler';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/platform/dashboard/browser/interfaces';
import { isNumber } from 'vs/base/common/types';
import { convertSize } from 'sql/base/browser/dom';
@Component({
selector: 'modelview-checkbox',
@@ -84,10 +85,10 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
this._input.disable();
}
if (this.width || isNumber(this.width)) {
this._input.setWidth(this.convertSize(this.width));
this._input.setWidth(convertSize(this.width));
}
if (this.height || isNumber(this.height)) {
this._input.setHeight(this.convertSize(this.height));
this._input.setHeight(convertSize(this.height));
}
if (this.ariaLabel) {
this._input.ariaLabel = this.ariaLabel;