Skip to content

Commit 2b23883

Browse files
authored
refactor(card): transform elevated input as boolean (#14272)
1 parent 0691e91 commit 2b23883

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

projects/igniteui-angular/src/lib/card/card.component.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ export class IgxCardFooterDirective {
201201
standalone: true
202202
})
203203
export class IgxCardComponent {
204-
private static ngAcceptInputType_elevated: boolean | '';
205-
206204
/**
207205
* Sets/gets the `id` of the card.
208206
* If not set, `id` will have value `"igx-card-0"`;
@@ -253,15 +251,9 @@ export class IgxCardComponent {
253251
* let cardElevation = this.card.elevated;
254252
* ```
255253
*/
256-
@Input()
254+
@Input({transform: booleanAttribute})
257255
@HostBinding('class.igx-card--elevated')
258-
public get elevated(): boolean {
259-
return this._elevated;
260-
}
261-
262-
public set elevated(value: boolean) {
263-
this._elevated = (value as any === '') || value;
264-
}
256+
public elevated = false;
265257

266258
/**
267259
* Sets the value of the `horizontal` attribute of the card.
@@ -276,12 +268,6 @@ export class IgxCardComponent {
276268
@HostBinding('class.igx-card--horizontal')
277269
@Input({ transform: booleanAttribute })
278270
public horizontal = false;
279-
280-
/**
281-
* @hidden
282-
* @internal
283-
*/
284-
private _elevated = false;
285271
}
286272

287273
export const IgxCardActionsLayout = /*@__PURE__*/mkenum({

0 commit comments

Comments
 (0)