Add support for firewall rule name (#21430)

This commit is contained in:
Cheena Malhotra
2022-12-16 18:29:44 -08:00
committed by GitHub
parent e2b1e6cbf3
commit ca22686061
11 changed files with 303 additions and 85 deletions

View File

@@ -27,6 +27,7 @@ export class DropdownList extends Dropdown {
protected backgroundColor?: Color;
protected foregroundColor?: Color;
protected borderColor?: Color;
protected borderWidth = 1;
private button?: Button;
@@ -89,7 +90,7 @@ export class DropdownList extends Dropdown {
*/
protected override renderContents(container: HTMLElement): IDisposable {
let div = DOM.append(container, this._contentContainer);
div.style.width = DOM.getTotalWidth(this.element) + 'px';
div.style.width = (DOM.getTotalWidth(this.element) - this.borderWidth * 2) + 'px'; // Subtract border width
return { dispose: () => { } };
}
@@ -145,7 +146,8 @@ export class DropdownList extends Dropdown {
element.style.backgroundColor = background;
element.style.color = foreground;
element.style.borderWidth = border ? '1px' : '';
this.borderWidth = border ? 1 : 0;
element.style.borderWidth = border ? this.borderWidth + 'px' : '';
element.style.borderStyle = border ? 'solid' : '';
element.style.borderColor = border;
}