mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Making infobox clickable (#18676)
* Making infobox clickable * Making it accessible * Moving API to proposed * Matching styling from portal * Fixing some styling * Moving to proposed * Removing extra spacing * Registering and Unregistering listeners * Fixing listeners * Registering emitter only once. * Changing emitter type from undefined to void * Adding arialabel to clickable link * Changing property name to suit its purpose
This commit is contained in:
@@ -2085,6 +2085,7 @@ class InfoBoxComponentWrapper extends ComponentWrapper implements azdata.InfoBox
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string, logService: ILogService) {
|
||||
super(proxy, handle, ModelComponentTypes.InfoBox, id, logService);
|
||||
this.properties = {};
|
||||
this._emitterMap.set(ComponentEventType.onDidClick, new Emitter<void>());
|
||||
}
|
||||
|
||||
public get style(): azdata.InfoBoxStyle {
|
||||
@@ -2110,6 +2111,27 @@ class InfoBoxComponentWrapper extends ComponentWrapper implements azdata.InfoBox
|
||||
public set announceText(v: boolean) {
|
||||
this.setProperty('announceText', v);
|
||||
}
|
||||
|
||||
public get isClickable(): boolean {
|
||||
return this.properties['isClickable'];
|
||||
}
|
||||
|
||||
public set isClickable(v: boolean) {
|
||||
this.setProperty('isClickable', v);
|
||||
}
|
||||
|
||||
public get clickableButtonAriaLabel(): string {
|
||||
return this.properties['clickableButtonAriaLabel'];
|
||||
}
|
||||
|
||||
public set clickableButtonAriaLabel(v: string) {
|
||||
this.setProperty('clickableButtonAriaLabel', v);
|
||||
}
|
||||
|
||||
public get onDidClick(): vscode.Event<any> {
|
||||
let emitter = this._emitterMap.get(ComponentEventType.onDidClick);
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
}
|
||||
|
||||
class SliderComponentWrapper extends ComponentWrapper implements azdata.SliderComponent {
|
||||
|
||||
Reference in New Issue
Block a user