mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 18:48:33 -05:00
Introduce vertical cards (#12125)
* Introduce vertical cards * Simplify and add a css type * Feedback * Update yarn.lock
This commit is contained in:
27
src/sql/azdata.proposed.d.ts
vendored
27
src/sql/azdata.proposed.d.ts
vendored
@@ -202,22 +202,20 @@ declare module 'azdata' {
|
||||
|
||||
export interface RadioCard {
|
||||
id: string;
|
||||
label: string;
|
||||
descriptions?: RadioCardDescription[];
|
||||
descriptions: RadioCardDescription[];
|
||||
icon?: string | vscode.Uri | { light: string | vscode.Uri; dark: string | vscode.Uri };
|
||||
}
|
||||
|
||||
export interface RadioCardDescription {
|
||||
ariaLabel: string;
|
||||
labelHeader: string;
|
||||
contents: RadioCardLabelValuePair[];
|
||||
valueHeader?: string;
|
||||
textValue: string;
|
||||
linkDisplayValue?: string;
|
||||
displayLinkCodicon?: boolean;
|
||||
textStyles?: CssStyles;
|
||||
linkStyles?: CssStyles;
|
||||
linkCodiconStyles?: CssStyles;
|
||||
}
|
||||
|
||||
export interface RadioCardLabelValuePair {
|
||||
label: string;
|
||||
value?: string;
|
||||
}
|
||||
export type CssStyles = { [key: string]: string | number };
|
||||
|
||||
export interface RadioCardGroupComponentProperties extends ComponentProperties, TitledComponentProperties {
|
||||
cards: RadioCard[];
|
||||
@@ -226,13 +224,20 @@ declare module 'azdata' {
|
||||
iconWidth?: string;
|
||||
iconHeight?: string;
|
||||
selectedCardId?: string;
|
||||
orientation?: Orientation // Defaults to horizontal
|
||||
}
|
||||
|
||||
export type RadioCardSelectionChangedEvent = { cardId: string; card: RadioCard };
|
||||
export type RadioCardLinkClickEvent = { cardId: string, card: RadioCard, selectorText: RadioCardDescription };
|
||||
|
||||
export interface RadioCardGroupComponent extends Component, RadioCardGroupComponentProperties {
|
||||
/**
|
||||
* The card object returned from this function is a clone of the internal representation - changes will not impact the original object
|
||||
*/
|
||||
onSelectionChanged: vscode.Event<{ cardId: string; card?: RadioCard }>;
|
||||
onSelectionChanged: vscode.Event<RadioCardSelectionChangedEvent>;
|
||||
|
||||
onLinkClick: vscode.Event<RadioCardLinkClickEvent>;
|
||||
|
||||
}
|
||||
|
||||
export interface SeparatorComponent extends Component {
|
||||
|
||||
Reference in New Issue
Block a user