mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
new component - infobox (#14027)
* new component: infobox * comments * new option * add comments
This commit is contained in:
@@ -7,6 +7,7 @@ import * as colors from './colors';
|
||||
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import * as cr from 'vs/platform/theme/common/colorRegistry';
|
||||
import * as sqlcr from 'sql/platform/theme/common/colorRegistry';
|
||||
import { attachStyler, IColorMapping, IStyleOverrides } from 'vs/platform/theme/common/styler';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IThemable } from 'vs/base/common/styler';
|
||||
@@ -306,3 +307,21 @@ export function attachCheckboxStyler(widget: IThemable, themeService: IThemeServ
|
||||
disabledCheckboxForeground: (style && style.disabledCheckboxForeground) || colors.disabledCheckboxForeground
|
||||
}, widget);
|
||||
}
|
||||
|
||||
export interface IInfoBoxStyleOverrides {
|
||||
informationBackground: cr.ColorIdentifier,
|
||||
warningBackground: cr.ColorIdentifier,
|
||||
errorBackground: cr.ColorIdentifier,
|
||||
successBackground: cr.ColorIdentifier
|
||||
}
|
||||
|
||||
export const defaultInfoBoxStyles: IInfoBoxStyleOverrides = {
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user