mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
deprecate the card component (#8552)
* deprecate the card component * add deprecated tag
This commit is contained in:
3
src/sql/azdata.d.ts
vendored
3
src/sql/azdata.d.ts
vendored
@@ -2477,6 +2477,9 @@ declare module 'azdata' {
|
||||
flexContainer(): FlexBuilder;
|
||||
splitViewContainer(): SplitViewBuilder;
|
||||
dom(): ComponentBuilder<DomComponent>;
|
||||
/**
|
||||
* @deprecated please use radioCardGroup component.
|
||||
*/
|
||||
card(): ComponentBuilder<CardComponent>;
|
||||
inputBox(): ComponentBuilder<InputBoxComponent>;
|
||||
checkBox(): ComponentBuilder<CheckBoxComponent>;
|
||||
|
||||
@@ -79,7 +79,12 @@ class ModelBuilderImpl implements azdata.ModelBuilder {
|
||||
return container;
|
||||
}
|
||||
|
||||
private cardDeprecationMessagePrinted = false;
|
||||
card(): azdata.ComponentBuilder<azdata.CardComponent> {
|
||||
if (!this.cardDeprecationMessagePrinted) {
|
||||
console.warn(`Extension '${this._extension.identifier.value}' is using card component which has been replaced by radioCardGroup. the card component will be removed in a future release.`);
|
||||
this.cardDeprecationMessagePrinted = true;
|
||||
}
|
||||
let id = this.getNextComponentId();
|
||||
let builder: ComponentBuilderImpl<azdata.CardComponent> = this.getComponentBuilder(new CardWrapper(this._proxy, this._handle, id), id);
|
||||
this._componentBuilders.set(id, builder);
|
||||
|
||||
Reference in New Issue
Block a user