Skip to content

Commit

Permalink
make it compatible for phplower versions
Browse files Browse the repository at this point in the history
  • Loading branch information
WebMamba committed Mar 9, 2024
1 parent d24b20d commit 470fb79
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions extra/html-extra/CVA.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

final class CVA
{
private $base;
private $variants;
private $compoundVariants;
private $defaultVariants;

/**
* @var string|list<string|null>|null
* @var array<string, array<string, string|list<string|null>>|null the array should have the following format [variantCategory => [variantName => classes]]
Expand All @@ -21,11 +26,15 @@ final class CVA
* @var array<string, string>|null
*/
public function __construct(
private string|array|null $base = null,
private ?array $variants = null,
private ?array $compoundVariants = null,
private ?array $defaultVariants = null,
$base = null,
$variants = null,
$compoundVariants = null,
$defaultVariants = null,
) {
$this->base = $base;
$this->variants = $variants;
$this->compoundVariants = $compoundVariants;
$this->defaultVariants = $defaultVariants;
}

public function apply(array $recipes, string ...$classes): string
Expand Down

0 comments on commit 470fb79

Please sign in to comment.