new component - infobox (#14027)

* new component: infobox

* comments

* new option

* add comments
This commit is contained in:
Alan Ren
2021-01-22 18:38:10 -08:00
committed by GitHub
parent dd0fa50d32
commit d059032dee
18 changed files with 358 additions and 7 deletions

View File

@@ -330,6 +330,7 @@ declare module 'azdata' {
tabbedPanel(): TabbedPanelComponentBuilder;
separator(): ComponentBuilder<SeparatorComponent, SeparatorComponentProperties>;
propertiesContainer(): ComponentBuilder<PropertiesContainerComponent, PropertiesContainerComponentProperties>;
infoBox(): ComponentBuilder<InfoBoxComponent, InfoBoxComponentProperties>;
}
export interface ComponentBuilder<TComponent extends Component, TPropertyBag extends ComponentProperties> {
@@ -604,6 +605,32 @@ declare module 'azdata' {
propertyItems?: PropertiesContainerItem[];
}
/**
* Component to display text with an icon representing the severity
*/
export interface InfoBoxComponent extends Component, InfoBoxComponentProperties {
}
export type InfoBoxStyle = 'information' | 'warning' | 'error' | 'success';
/**
* Properties for configuring a InfoBoxComponent
*/
export interface InfoBoxComponentProperties extends ComponentProperties {
/**
* The style of the InfoBox
*/
style: InfoBoxStyle;
/**
* The display text of the InfoBox
*/
text: string;
/**
* Controls whether the text should be announced by the screen reader. Default value is false.
*/
announceText?: boolean;
}
export namespace nb {
/**
* An event that is emitted when the active Notebook editor is changed.