Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class Icon extends Component |
||
12 | { |
||
13 | public string $uuid; |
||
14 | |||
15 | public function __construct( |
||
20 | } |
||
21 | |||
22 | public function icon(): string|Stringable |
||
27 | } |
||
28 | |||
29 | public function labelClasses(): ?string |
||
30 | { |
||
31 | // Remove `w-*` and `h-*` classes, because it applies only for icon |
||
32 | return Str::replaceMatches('/(w-\w*)|(h-\w*)/', '', $this->attributes->get('class') ?? ''); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get the view / contents that represent the component. |
||
37 | */ |
||
38 | public function render(): View|Closure|string |
||
41 | } |
||
42 | } |
||
43 |