implement styler for infobutton (#14396)

* implement styler for infobutton

* comments

* one more comment
This commit is contained in:
Alan Ren
2021-02-23 13:28:48 -08:00
committed by GitHub
parent 948bb5bc34
commit 561242a0d9
6 changed files with 76 additions and 58 deletions

View File

@@ -299,12 +299,30 @@ export interface IInfoBoxStyleOverrides {
}
export const defaultInfoBoxStyles: IInfoBoxStyleOverrides = {
informationBackground: sqlcr.InfoBoxInformationBackground,
warningBackground: sqlcr.InfoBoxWarningBackground,
errorBackground: sqlcr.InfoBoxErrorBackground,
successBackground: sqlcr.InfoBoxSuccessBackground
informationBackground: sqlcr.infoBoxInformationBackground,
warningBackground: sqlcr.infoBoxWarningBackground,
errorBackground: sqlcr.infoBoxErrorBackground,
successBackground: sqlcr.infoBoxSuccessBackground
};
export function attachInfoBoxStyler(widget: IThemable, themeService: IThemeService, style?: IInfoBoxStyleOverrides): IDisposable {
return attachStyler(themeService, { ...defaultInfoBoxStyles, ...style }, widget);
}
export interface IInfoButtonStyleOverrides {
buttonBackground: cr.ColorIdentifier,
buttonForeground: cr.ColorIdentifier,
buttonBorder: cr.ColorIdentifier,
buttonHoverBackground: cr.ColorIdentifier
}
export const defaultInfoButtonStyles: IInfoButtonStyleOverrides = {
buttonBackground: sqlcr.infoButtonBackground,
buttonForeground: sqlcr.infoButtonForeground,
buttonBorder: sqlcr.infoButtonBorder,
buttonHoverBackground: sqlcr.infoButtonHoverBackground
};
export function attachInfoButtonStyler(widget: IThemable, themeService: IThemeService, style?: IInfoButtonStyleOverrides): IDisposable {
return attachStyler(themeService, { ...defaultInfoButtonStyles, ...style }, widget);
}