deprecate the card component (#8552)

* deprecate the card component

* add deprecated tag
This commit is contained in:
Alan Ren
2019-12-04 10:48:08 -08:00
committed by GitHub
parent ee94524ab1
commit ab94b9785e
2 changed files with 8 additions and 0 deletions

View File

@@ -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);