Set label property
This commit is contained in:
@@ -13,6 +13,7 @@ use TailwindMerge\TailwindMerge;
|
||||
final class Badge
|
||||
{
|
||||
public string $finalClasses;
|
||||
public ?string $label = null;
|
||||
|
||||
public function __construct(private string $baseClasses)
|
||||
{
|
||||
@@ -28,6 +29,8 @@ final class Badge
|
||||
*/
|
||||
public function mount(?BadgeableInterface $obj = null, ?string $class = null, ?string $colour = null, ?string $label = null, bool $outline = false): void
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
if (!$obj && !$colour) {
|
||||
throw new \RuntimeException(sprintf('You must specify either a colour an instance of "%s".', BadgeableInterface::class));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user