mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Introduce vertical cards (#12125)
* Introduce vertical cards * Simplify and add a css type * Feedback * Update yarn.lock
This commit is contained in:
@@ -1696,7 +1696,9 @@ class RadioCardGroupComponentWrapper extends ComponentWrapper implements azdata.
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
super(proxy, handle, ModelComponentTypes.RadioCardGroup, id);
|
||||
this.properties = {};
|
||||
this._emitterMap.set(ComponentEventType.onDidChange, new Emitter<any>());
|
||||
|
||||
this._emitterMap.set(ComponentEventType.onDidChange, new Emitter<azdata.RadioCardSelectionChangedEvent>());
|
||||
this._emitterMap.set(ComponentEventType.onDidClick, new Emitter<azdata.RadioCardLinkClickEvent>());
|
||||
}
|
||||
|
||||
public get iconWidth(): string | undefined {
|
||||
@@ -1746,10 +1748,23 @@ class RadioCardGroupComponentWrapper extends ComponentWrapper implements azdata.
|
||||
this.setProperty('selectedCardId', v);
|
||||
}
|
||||
|
||||
public get onSelectionChanged(): vscode.Event<any> {
|
||||
public get orientation(): azdata.Orientation | undefined {
|
||||
return this.properties['orientation'];
|
||||
}
|
||||
|
||||
public set orientation(orientation: azdata.Orientation | undefined) {
|
||||
this.setProperty('orientation', orientation);
|
||||
}
|
||||
|
||||
public get onSelectionChanged(): vscode.Event<azdata.RadioCardSelectionChangedEvent> {
|
||||
let emitter = this._emitterMap.get(ComponentEventType.onDidChange);
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
|
||||
public get onLinkClick(): vscode.Event<azdata.RadioCardLinkClickEvent> {
|
||||
let emitter = this._emitterMap.get(ComponentEventType.onDidClick);
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
}
|
||||
|
||||
class TabbedPanelComponentWrapper extends ComponentWrapper implements azdata.TabbedPanelComponent {
|
||||
|
||||
@@ -374,7 +374,7 @@ export enum CardType {
|
||||
|
||||
export enum Orientation {
|
||||
Horizontal = 'horizontal',
|
||||
Vertical = 'vertial'
|
||||
Vertical = 'vertical'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user