|
1 | 1 | @use '../../../../scss/theming' as *; |
2 | 2 |
|
3 | | -@mixin daff-raised-button-theme-variant($base-color) { |
| 3 | +@mixin daff-raised-button-theme-variant($theme, $base-color) { |
4 | 4 | @if daff-contrast-ratio($base-color, daff-text-contrast($base-color)) < 4.5 { |
5 | 5 | @error 'Button Initial State: ' + map.get(a11y.$wcag-aa-errors, 'text-contrast'); |
6 | 6 | } |
|
37 | 37 | $neutral: daff-get-palette($theme, neutral); |
38 | 38 |
|
39 | 39 | .daff-raised-button { |
40 | | - @include daff-raised-button-theme-variant(daff-color($neutral, 20)); |
| 40 | + @include daff-raised-button-theme-variant($theme, daff-color($neutral, 20)); |
41 | 41 |
|
42 | 42 | &.daff-primary { |
43 | | - @include daff-raised-button-theme-variant(daff-color($primary)); |
| 43 | + @include daff-raised-button-theme-variant($theme, daff-color($primary)); |
44 | 44 | } |
45 | 45 |
|
46 | 46 | &.daff-secondary { |
47 | | - @include daff-raised-button-theme-variant(daff-color($secondary)); |
| 47 | + @include daff-raised-button-theme-variant($theme, daff-color($secondary)); |
48 | 48 | } |
49 | 49 |
|
50 | 50 | &.daff-tertiary { |
51 | | - @include daff-raised-button-theme-variant(daff-color($tertiary)); |
| 51 | + @include daff-raised-button-theme-variant($theme, daff-color($tertiary)); |
52 | 52 | } |
53 | 53 |
|
54 | 54 | &.daff-dark { |
55 | | - @include daff-raised-button-theme-variant($black); |
| 55 | + @include daff-raised-button-theme-variant($theme, $black); |
56 | 56 | } |
57 | 57 |
|
58 | 58 | &.daff-light { |
59 | | - @include daff-raised-button-theme-variant($white); |
| 59 | + @include daff-raised-button-theme-variant($theme, $white); |
60 | 60 | } |
61 | 61 |
|
62 | 62 | &.daff-theme { |
63 | | - @include daff-raised-button-theme-variant($base); |
| 63 | + @include daff-raised-button-theme-variant($theme, $base); |
64 | 64 | } |
65 | 65 |
|
66 | 66 | &.daff-theme-contrast { |
67 | | - @include daff-raised-button-theme-variant($base-contrast); |
| 67 | + @include daff-raised-button-theme-variant($theme, $base-contrast); |
68 | 68 | } |
69 | 69 |
|
70 | 70 | &[disabled], |
71 | 71 | &.daff-disabled { |
72 | | - @include daff-raised-button-theme-variant(daff-color($neutral, 30)); |
| 72 | + @include daff-raised-button-theme-variant($theme, daff-color($neutral, 30)); |
73 | 73 | color: daff-color($neutral, 50); |
74 | 74 |
|
75 | 75 | &::after { |
|
78 | 78 | } |
79 | 79 |
|
80 | 80 | &.daff-warn { |
81 | | - @include daff-raised-button-theme-variant(daff-color($warn)); |
| 81 | + @include daff-raised-button-theme-variant($theme, daff-color($warn)); |
82 | 82 | } |
83 | 83 |
|
84 | 84 | &.daff-critical { |
85 | | - @include daff-raised-button-theme-variant(daff-color($critical)); |
| 85 | + @include daff-raised-button-theme-variant($theme, daff-color($critical)); |
86 | 86 | } |
87 | 87 |
|
88 | 88 | &.daff-success { |
89 | | - @include daff-raised-button-theme-variant(daff-color($success)); |
| 89 | + @include daff-raised-button-theme-variant($theme, daff-color($success)); |
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
0 commit comments