Clean up button component disposables (#14011)

* Clean up button component disposables

* consolidate logic
This commit is contained in:
Charles Gagnon
2021-01-21 12:08:16 -08:00
committed by GitHub
parent a96caf82c3
commit 07d798c949
2 changed files with 34 additions and 13 deletions

View File

@@ -283,12 +283,14 @@ export function attachEditableDropdownStyler(widget: IThemable, themeService: IT
}, widget);
}
export function attachButtonStyler(widget: IThemable, themeService: IThemeService, style?: {
type ButtonStyle = {
buttonForeground?: cr.ColorIdentifier,
buttonBackground?: cr.ColorIdentifier,
buttonHoverBackground?: cr.ColorIdentifier,
buttonFocusOutline?: cr.ColorIdentifier
}): IDisposable {
};
export function attachButtonStyler(widget: IThemable, themeService: IThemeService, style?: ButtonStyle): IDisposable {
return attachStyler(themeService, {
buttonForeground: (style && style.buttonForeground) || cr.buttonForeground,
buttonBackground: (style && style.buttonBackground) || cr.buttonBackground,