Skip to content

Commit dc70385

Browse files
committed
refactor(card): update custom shadow sample
1 parent 7760320 commit dc70385

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
@use '../../../../variables' as *;
2-
3-
// Creating colors for all 3 shadows
4-
$color-1: #bcb8ce;
5-
$color-2: #917898;
6-
$color-3: #4c394f;
7-
8-
// Use elevations to generate sass maps for all three
9-
// box-shadows with the costume colors
10-
$colorful-elevations: elevations($color-1, $color-2, $color-3);
11-
12-
// Use the elevation to set the desired elevation level
13-
$custom-theme: card-theme(
14-
$elevations: $colorful-elevations
1+
@use 'igniteui-theming/sass/elevations' as *;
2+
@use 'igniteui-theming/sass/elevations/presets' as * with (
3+
$color-1: #4c394f,
4+
$color-2: #917898,
5+
$color-3: #bcb8ce
156
);
167

178
:host {
9+
@include elevations($material-elevations);
10+
1811
display: flex;
1912
flex-wrap: nowrap;
2013
justify-content: center;
@@ -33,8 +26,9 @@ $custom-theme: card-theme(
3326
}
3427

3528
::ng-deep {
36-
.custom-card {
37-
@include card($custom-theme);
29+
igx-card#igx-card-1 {
30+
--resting-shadow: #{elevation(8)};
31+
--hover-shadow: #{elevation(16)};
3832
}
3933
}
4034
}

0 commit comments

Comments
 (0)