|
2 | 2 | position: relative; |
3 | 3 | display: flex; |
4 | 4 | display: inline-block; |
5 | | - flex-direction: row; |
6 | 5 | width: auto; |
| 6 | + flex-direction: row; |
7 | 7 | justify-content: center; |
8 | 8 | align-items: center; |
9 | 9 | flex-shrink: 0; |
|
22 | 22 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); |
23 | 23 | color: $button-default-color; |
24 | 24 | background: $button-default-background-color; |
25 | | - // TODO:临时限制的宽度,后续适配同学会调整 |
26 | | - width: 100px; |
| 25 | + border-width: $button-border-width; |
27 | 26 |
|
28 | 27 | &-text { |
29 | 28 | margin-left: $button-text-icon-margin; |
30 | | - |
31 | 29 | &.right { |
32 | 30 | margin-right: $button-text-icon-margin; |
33 | 31 | } |
|
68 | 66 | flex-direction: row; |
69 | 67 | align-items: center; |
70 | 68 | justify-content: center; |
71 | | - // RN 不支持 |
72 | | - // background: initial; |
| 69 | + /* #ifndef rn harmony */ |
| 70 | + background: initial; |
| 71 | + /* #endif */ |
73 | 72 | .nut-icon { |
74 | 73 | font-size: $button-default-font-size; |
75 | 74 | width: $button-default-font-size; |
|
91 | 90 |
|
92 | 91 | &-default { |
93 | 92 | padding: $button-default-padding; |
94 | | - border: $button-border-width solid $button-default-border-color; |
95 | | - |
96 | | - &.nut-button-disabled { |
97 | | - color: $button-default-disabled-color; |
98 | | - background: transparent; |
99 | | - } |
| 93 | + border-style: solid; |
| 94 | + border-color: $button-default-border-color; |
100 | 95 |
|
101 | 96 | &.nut-button-none { |
102 | | - background: transparent; |
103 | | - |
104 | 97 | &.nut-button-disabled { |
105 | 98 | color: $button-default-disabled-color; |
106 | 99 | } |
107 | 100 | } |
108 | 101 |
|
109 | 102 | &.nut-button-outline, |
110 | 103 | &.nut-button-dashed { |
111 | | - background: transparent; |
112 | | - |
113 | 104 | &.nut-button-disabled { |
114 | | - color: $button-default-disabled-color; |
| 105 | + background: transparent; |
| 106 | + color: $button-default-disabled; |
115 | 107 | border-color: $button-default-disabled; |
116 | 108 | } |
117 | 109 | } |
|
173 | 165 |
|
174 | 166 | &-primary { |
175 | 167 | color: $button-primary-color; |
176 | | - // RN 不支持 |
177 | | - background: #fa2c19; //$button-primary-background-color; |
| 168 | + background: $button-primary-background-color; |
178 | 169 | background-origin: border-box; |
179 | | - border: $button-border-width solid transparent; |
| 170 | + border-color: transparent; |
180 | 171 |
|
181 | 172 | &.nut-button-disabled { |
182 | 173 | background: $button-primary-disabled; |
183 | 174 | border-color: $button-primary-disabled; |
184 | 175 | } |
185 | 176 |
|
186 | 177 | &.nut-button-none { |
187 | | - background: transparent; |
188 | 178 | color: $button-primary-border-color; |
189 | 179 |
|
190 | 180 | &.nut-button-disabled { |
|
193 | 183 | } |
194 | 184 |
|
195 | 185 | &.nut-button-outline { |
196 | | - background: transparent; |
197 | 186 | color: $button-primary-border-color; |
198 | | - border: $button-border-width solid $button-primary-border-color; |
| 187 | + border-color: $button-primary-border-color; |
199 | 188 |
|
200 | 189 | &.nut-button-disabled { |
201 | 190 | color: $button-primary-disabled; |
|
204 | 193 | } |
205 | 194 |
|
206 | 195 | &.nut-button-dashed { |
207 | | - background: transparent; |
208 | 196 | color: $button-primary-border-color; |
209 | | - border: $button-border-width dashed $button-primary-border-color; |
| 197 | + border-color: $button-primary-border-color; |
210 | 198 |
|
211 | 199 | &.nut-button-disabled { |
212 | 200 | color: $button-primary-disabled; |
|
219 | 207 | color: $button-success-color; |
220 | 208 | background: $button-success-background-color; |
221 | 209 | background-origin: border-box; |
222 | | - border: $button-border-width solid transparent; |
| 210 | + border-color: transparent; |
223 | 211 |
|
224 | 212 | &.nut-button-disabled { |
225 | 213 | background: $button-success-disabled; |
|
230 | 218 | &.nut-button-dashed { |
231 | 219 | color: $button-success-border-color; |
232 | 220 | border-color: $button-success-border-color; |
233 | | - background: transparent; |
234 | 221 |
|
235 | 222 | &.nut-button-disabled { |
236 | 223 | color: $button-primary-disabled; |
|
240 | 227 |
|
241 | 228 | &.nut-button-none { |
242 | 229 | color: $button-success-border-color; |
| 230 | + &.nut-button-disabled { |
| 231 | + color: $button-success-disabled; |
| 232 | + } |
243 | 233 | } |
244 | 234 | } |
245 | 235 |
|
246 | 236 | &-info { |
247 | 237 | color: $button-info-color; |
248 | 238 | background: $button-info-background-color; |
249 | 239 | background-origin: border-box; |
250 | | - border: $button-border-width solid transparent; |
| 240 | + border-color: transparent; |
251 | 241 |
|
252 | 242 | &.nut-button-disabled { |
253 | 243 | background: $button-info-disabled; |
|
258 | 248 | &.nut-button-dashed { |
259 | 249 | color: $button-info-border-color; |
260 | 250 | border-color: $button-info-border-color; |
261 | | - background: transparent; |
262 | 251 |
|
263 | 252 | &.nut-button-disabled { |
264 | | - color: $button-primary-disabled; |
265 | | - border-color: $button-primary-disabled; |
| 253 | + color: $button-info-disabled; |
| 254 | + border-color: $button-info-disabled; |
266 | 255 | } |
267 | 256 | } |
268 | 257 |
|
269 | 258 | &.nut-button-none { |
270 | 259 | color: $button-info-border-color; |
| 260 | + &.nut-button-disabled { |
| 261 | + color: $button-info-disabled; |
| 262 | + } |
271 | 263 | } |
272 | 264 | } |
273 | 265 |
|
274 | 266 | &-danger { |
275 | 267 | color: $button-danger-color; |
276 | 268 | background: $button-danger-background-color; |
277 | 269 | background-origin: border-box; |
278 | | - border: $button-border-width solid transparent; |
| 270 | + border-color: transparent; |
279 | 271 |
|
280 | 272 | &.nut-button-disabled { |
281 | 273 | background: $button-danger-disabled; |
|
286 | 278 | &.nut-button-dashed { |
287 | 279 | color: $button-danger-border-color; |
288 | 280 | border-color: $button-danger-border-color; |
289 | | - background: transparent; |
290 | 281 |
|
291 | 282 | &.nut-button-disabled { |
292 | 283 | color: $button-danger-disabled; |
|
296 | 287 |
|
297 | 288 | &.nut-button-none { |
298 | 289 | color: $button-danger-border-color; |
| 290 | + &.nut-button-disabled { |
| 291 | + color: $button-danger-disabled; |
| 292 | + } |
299 | 293 | } |
300 | 294 | } |
301 | 295 |
|
302 | 296 | &-warning { |
303 | 297 | color: $button-warning-color; |
304 | 298 | background: $button-warning-background-color; |
305 | 299 | background-origin: border-box; |
306 | | - border: $button-border-width solid transparent; |
| 300 | + border-color: transparent; |
307 | 301 |
|
308 | 302 | &.nut-button-disabled { |
309 | 303 | background: $button-warning-disabled; |
|
314 | 308 | &.nut-button-dashed { |
315 | 309 | color: $button-warning-border-color; |
316 | 310 | border-color: $button-warning-border-color; |
317 | | - background: transparent; |
318 | 311 |
|
319 | 312 | &.nut-button-disabled { |
320 | 313 | color: $button-warning-disabled; |
|
324 | 317 |
|
325 | 318 | &.nut-button-none { |
326 | 319 | color: $button-warning-border-color; |
| 320 | + &.nut-button-disabled { |
| 321 | + color: $button-warning-disabled; |
| 322 | + } |
327 | 323 | } |
328 | 324 | } |
329 | 325 |
|
|
332 | 328 | width: 100%; |
333 | 329 | } |
334 | 330 |
|
335 | | - &-solid { |
336 | | - color: $button-primary-color; |
337 | | - // RN 不支持 |
338 | | - background: #ff0f23; //$button-primary-background-color; |
339 | | - background-origin: border-box; |
340 | | - border: $button-border-width solid transparent; |
341 | | - |
342 | | - &.nut-button-disabled { |
343 | | - color: $button-default-disabled-color; |
344 | | - background: $button-default-disabled; |
345 | | - } |
| 331 | + &.nut-button-outline { |
| 332 | + background: transparent; |
| 333 | + border-style: solid; |
346 | 334 | } |
347 | 335 |
|
348 | | - &.nut-button-outline, |
349 | 336 | &.nut-button-dashed { |
350 | 337 | background: transparent; |
| 338 | + border-style: dashed; |
351 | 339 | } |
352 | 340 |
|
353 | 341 | &.nut-button-none { |
354 | 342 | background: transparent; |
355 | 343 | border-color: transparent; |
356 | | - background: transparent; |
357 | 344 | } |
358 | 345 |
|
359 | 346 | &-disabled { |
|
400 | 387 | margin-left: $button-text-icon-margin; |
401 | 388 | } |
402 | 389 | } |
| 390 | + |
403 | 391 | &::before { |
404 | 392 | left: auto; |
405 | 393 | right: 50%; |
|
0 commit comments