trimox / angular-mdc-web

Angular wrapper for Material Design (Web) Components
https://trimox.github.io/angular-mdc-web
MIT License
517 stars 87 forks source link

[mdcElevation] Elevation isn't working with mdc-card #2183

Closed KaranKapoorIon closed 4 years ago

KaranKapoorIon commented 4 years ago

Describe the bug The mdcElevation property doesn't do anything for an mdc-card right now. It was working before I upgraded from 3.2.1 to 5.1.0

To Reproduce Steps to reproduce the behavior:

<mdc-card [mdcElevation]="4">
    Hello, I am a card
</mdc-card>

Expected behavior The card should have a shadow around it.

What Angular MDC version are you using? 5.1.1

What OS are you using?: Windows Server 2012

What browser(s) is this bug affecting?: Chrome

trimox commented 4 years ago

@KaranKapoorIon By default, cards are elevated which is overriding the custom mdcElevation. Try this..

<mdc-card>
  <div [mdcElevation]="5">
    Hello, I am a card
  </div>
</mdc-card>
KaranKapoorIon commented 4 years ago

@trimox That worked like a charm. Thanks!

PS - You guys have done such a fantastic job with angular mdc. Thanks again! :+1:

trimox commented 4 years ago

@KaranKapoorIon Thank you, much appreciated!