add toggle button for properties container (#16335)

This commit is contained in:
Alan Ren
2021-07-19 23:36:52 -07:00
committed by GitHub
parent 9b31e7beac
commit 1000e97091
6 changed files with 74 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ export default class PropertiesContainerComponent extends ComponentBase<azdata.P
public override setProperties(properties: { [key: string]: any; }): void {
super.setProperties(properties);
this._propertiesContainer.propertyItems = this.propertyItems;
this._propertiesContainer.showToggleButton = this.showToggleButton;
}
public get propertyItems(): PropertyItem[] {
@@ -57,6 +58,10 @@ export default class PropertiesContainerComponent extends ComponentBase<azdata.P
this.setPropertyFromUI<azdata.PropertiesContainerItem[]>((props, value) => props.propertyItems = value, newValue);
this._propertiesContainer.propertyItems = newValue;
}
public get showToggleButton(): boolean {
return this.getPropertyOrDefault<boolean>((props) => props.showToggleButton, false);
}
}
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {