|
1 | 1 | @use 'sass:map';
|
2 | 2 | @use '../../styles/typography.scss';
|
3 |
| -@use '../../styles/variables/buttons.scss'; |
4 |
| - |
5 |
| -@mixin -kind-variant($colors) { |
6 |
| - color: map.get($colors, color); |
7 |
| - border-width: 2px; |
8 |
| - border-style: solid; |
9 |
| - border-color: map.get($colors, border-color); |
10 |
| - border-radius: 2px; |
11 |
| - background-color: map.get($colors, background-color); |
12 |
| - |
13 |
| - appearance: none; |
14 |
| - |
15 |
| - @include on-focus-visible { |
16 |
| - border-color: map.get($colors, focus-border-color); |
17 |
| - background-color: map.get($colors, focus-background-color); |
18 |
| - @include use-focus-shadow(map.get($colors, focus-shadow-color)); |
19 |
| - } |
20 |
| - |
21 |
| - @include on-hover { |
22 |
| - border-color: map.get($colors, hover-border-color); |
23 |
| - background-color: map.get($colors, hover-background-color); |
24 |
| - @include use-no-shadow; |
25 |
| - } |
26 |
| - |
27 |
| - @include on-active { |
28 |
| - border-color: map.get($colors, active-border-color); |
29 |
| - background-color: map.get($colors, active-background-color); |
30 |
| - @include use-no-shadow; |
31 |
| - } |
32 |
| - |
33 |
| - @include on-disabled { |
34 |
| - color: map.get($colors, disabled-color); |
35 |
| - border-color: map.get($colors, disabled-border-color); |
36 |
| - background-color: map.get($colors, disabled-background-color); |
37 |
| - } |
38 |
| -} |
| 3 | +@use '../../styles/variables/buttons.scss' as colors; |
| 4 | +@use '../../styles/primitives/button.scss'; |
39 | 5 |
|
40 | 6 | .rcx-button {
|
41 | 7 | @mixin with-rectangular-size($height, $padding-x, $line-height) {
|
|
78 | 44 | $line-height: typography.line-height(p1)
|
79 | 45 | );
|
80 | 46 |
|
81 |
| - @include -kind-variant(buttons.$secondary); |
| 47 | + @include button.kind-variant(colors.$secondary); |
82 | 48 |
|
83 | 49 | &--small {
|
84 | 50 | @include typography.use-font-scale(c2);
|
|
111 | 77 | }
|
112 | 78 |
|
113 | 79 | &--info {
|
114 |
| - @include -kind-variant(buttons.$secondary-info); |
| 80 | + @include button.kind-variant(colors.$secondary-info); |
115 | 81 | }
|
116 | 82 |
|
117 | 83 | &--success {
|
118 |
| - @include -kind-variant(buttons.$secondary-success); |
| 84 | + @include button.kind-variant(colors.$secondary-success); |
119 | 85 | }
|
120 | 86 |
|
121 | 87 | &--warning {
|
122 |
| - @include -kind-variant(buttons.$secondary-warning); |
| 88 | + @include button.kind-variant(colors.$secondary-warning); |
123 | 89 | }
|
124 | 90 |
|
125 | 91 | &--danger {
|
126 |
| - @include -kind-variant(buttons.$secondary-danger); |
| 92 | + @include button.kind-variant(colors.$secondary-danger); |
127 | 93 | }
|
128 | 94 |
|
129 | 95 | &--primary {
|
130 |
| - @include -kind-variant(buttons.$primary); |
| 96 | + @include button.kind-variant(colors.$primary); |
131 | 97 | }
|
132 | 98 |
|
133 | 99 | &--primary-info {
|
134 |
| - @include -kind-variant(buttons.$info); |
| 100 | + @include button.kind-variant(colors.$info); |
135 | 101 | }
|
136 | 102 |
|
137 | 103 | &--primary-success {
|
138 |
| - @include -kind-variant(buttons.$success); |
| 104 | + @include button.kind-variant(colors.$success); |
139 | 105 | }
|
140 | 106 |
|
141 | 107 | &--primary-warning {
|
142 |
| - @include -kind-variant(buttons.$warning); |
| 108 | + @include button.kind-variant(colors.$warning); |
143 | 109 | }
|
144 | 110 |
|
145 | 111 | &--primary-danger {
|
146 |
| - @include -kind-variant(buttons.$danger); |
| 112 | + @include button.kind-variant(colors.$danger); |
147 | 113 | }
|
148 | 114 |
|
149 | 115 | &--ghost {
|
150 |
| - @include -kind-variant(buttons.$ghost); |
| 116 | + @include button.kind-variant(colors.$ghost); |
151 | 117 | }
|
152 | 118 |
|
153 | 119 | &--ghost-info {
|
154 |
| - @include -kind-variant(buttons.$ghost-info); |
| 120 | + @include button.kind-variant(colors.$ghost-info); |
155 | 121 | }
|
156 | 122 |
|
157 | 123 | &--ghost-success {
|
158 |
| - @include -kind-variant(buttons.$ghost-success); |
| 124 | + @include button.kind-variant(colors.$ghost-success); |
159 | 125 | }
|
160 | 126 |
|
161 | 127 | &--ghost-warning {
|
162 |
| - @include -kind-variant(buttons.$ghost-warning); |
| 128 | + @include button.kind-variant(colors.$ghost-warning); |
163 | 129 | }
|
164 | 130 |
|
165 | 131 | &--ghost-danger {
|
166 |
| - @include -kind-variant(buttons.$ghost-danger); |
| 132 | + @include button.kind-variant(colors.$ghost-danger); |
167 | 133 | }
|
168 | 134 |
|
169 | 135 | &--nude {
|
170 |
| - @include -kind-variant(buttons.$nude); |
| 136 | + @include button.kind-variant(colors.$nude); |
171 | 137 | }
|
172 | 138 |
|
173 | 139 | &--nude-info {
|
174 |
| - @include -kind-variant(buttons.$nude-info); |
| 140 | + @include button.kind-variant(colors.$nude-info); |
175 | 141 | }
|
176 | 142 |
|
177 | 143 | &--nude-success {
|
178 |
| - @include -kind-variant(buttons.$nude-success); |
| 144 | + @include button.kind-variant(colors.$nude-success); |
179 | 145 | }
|
180 | 146 |
|
181 | 147 | &--nude-warning {
|
182 |
| - @include -kind-variant(buttons.$nude-warning); |
| 148 | + @include button.kind-variant(colors.$nude-warning); |
183 | 149 | }
|
184 | 150 |
|
185 | 151 | &--nude-danger {
|
186 |
| - @include -kind-variant(buttons.$nude-danger); |
| 152 | + @include button.kind-variant(colors.$nude-danger); |
187 | 153 | }
|
188 | 154 |
|
189 | 155 | &--ghostish {
|
190 |
| - @include -kind-variant(buttons.$ghostish); |
| 156 | + @include button.kind-variant(colors.$ghostish); |
191 | 157 | }
|
192 | 158 |
|
193 | 159 | &--ghostish-info {
|
194 |
| - @include -kind-variant(buttons.$ghostish-info); |
| 160 | + @include button.kind-variant(colors.$ghostish-info); |
195 | 161 | }
|
196 | 162 |
|
197 | 163 | &--ghostish-success {
|
198 |
| - @include -kind-variant(buttons.$ghostish-success); |
| 164 | + @include button.kind-variant(colors.$ghostish-success); |
199 | 165 | }
|
200 | 166 |
|
201 | 167 | &--ghostish-warning {
|
202 |
| - @include -kind-variant(buttons.$ghostish-warning); |
| 168 | + @include button.kind-variant(colors.$ghostish-warning); |
203 | 169 | }
|
204 | 170 |
|
205 | 171 | &--ghostish-danger {
|
206 |
| - @include -kind-variant(buttons.$ghostish-danger); |
| 172 | + @include button.kind-variant(colors.$ghostish-danger); |
207 | 173 | }
|
208 | 174 | }
|
0 commit comments