Skip to content

Commit 01d382f

Browse files
Open
1 parent 589c1e2 commit 01d382f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Field/Style/BadgeStyle.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ private function __construct(private array $classes, private array $style)
1414
{
1515
}
1616

17+
public function addClass(string $class): self
18+
{
19+
$this->classes[] = $class;
20+
21+
return $this;
22+
}
23+
24+
public function addStyle(string $key, string $value): self
25+
{
26+
$this->style[$key] = $value;
27+
28+
return $this;
29+
}
30+
1731
public static function new(): self
1832
{
1933
return new self(['badge'], []);
@@ -74,20 +88,6 @@ public function getStyle(): ?string
7488
return implode(' ', $style);
7589
}
7690

77-
private function addClass(string $class): self
78-
{
79-
$this->classes[] = $class;
80-
81-
return $this;
82-
}
83-
84-
private function addStyle(string $key, string $value): self
85-
{
86-
$this->style[$key] = $value;
87-
88-
return $this;
89-
}
90-
9191
private static function generateTextClassFromBackgroundColor(string $backgroundColor): string
9292
{
9393
if (1 !== preg_match('/^#[0-9a-f]{6}$/iD', $backgroundColor)) {

0 commit comments

Comments
 (0)