File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
src/TwigComponent/tests/Unit Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,30 @@ public static function recipeProvider(): iterable
236
236
'font-semibold border rounded text-primary text-sm text-red-100 ' ,
237
237
];
238
238
239
+ yield 'compound variants with true ' => [
240
+ [
241
+ 'base ' => 'button ' ,
242
+ 'variants ' => [
243
+ 'colors ' => [
244
+ 'blue ' => 'btn-blue ' ,
245
+ 'red ' => 'btn-red ' ,
246
+ ],
247
+ 'disabled ' => [
248
+ 'true ' => 'disabled ' ,
249
+ ],
250
+ ],
251
+ 'compounds ' => [
252
+ [
253
+ 'colors ' => 'blue ' ,
254
+ 'disabled ' => ['true ' ],
255
+ 'class ' => 'font-bold ' ,
256
+ ],
257
+ ],
258
+ ],
259
+ ['colors ' => 'blue ' , 'disabled ' => 'true ' ],
260
+ 'button btn-blue disabled font-bold ' ,
261
+ ];
262
+
239
263
yield 'compound variants as array ' => [
240
264
[
241
265
'base ' => 'font-semibold border rounded ' ,
@@ -450,6 +474,28 @@ public static function recipeProvider(): iterable
450
474
'font-semibold border rounded text-primary text-sm rounded-md ' ,
451
475
];
452
476
477
+ yield 'default variables with boolean ' => [
478
+ [
479
+ 'base ' => 'button ' ,
480
+ 'variants ' => [
481
+ 'colors ' => [
482
+ 'blue ' => 'btn-blue ' ,
483
+ 'red ' => 'btn-red ' ,
484
+ ],
485
+ 'disabled ' => [
486
+ 'true ' => 'disabled ' ,
487
+ 'false ' => 'opacity-100 ' ,
488
+ ],
489
+ ],
490
+ 'defaultVariants ' => [
491
+ 'colors ' => 'blue ' ,
492
+ 'disabled ' => 'false ' ,
493
+ ],
494
+ ],
495
+ [],
496
+ 'button btn-blue opacity-100 ' ,
497
+ ];
498
+
453
499
yield 'boolean string variants true / true ' => [
454
500
[
455
501
'variants ' => [
You can’t perform that action at this time.
0 commit comments