Skip to content

Commit b2a1d7c

Browse files
authored
Rename $enabled property as $hidden and add $disabled property for Menu Sub (#824) (#886)
1 parent 8e147d0 commit b2a1d7c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/View/Components/MenuSub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ public function __construct(
1616
public ?string $icon = null,
1717
public ?string $iconClasses = null,
1818
public bool $open = false,
19-
public ?bool $enabled = true,
19+
public ?bool $hidden = false,
20+
public ?bool $disabled = false,
2021
) {
2122
$this->uuid = "mary" . md5(serialize($this)) . $id;
2223
}
2324

2425
public function render(): View|Closure|string
2526
{
26-
if ($this->enabled === false) {
27+
if ($this->hidden === true) {
2728
return '';
2829
}
2930

@@ -35,6 +36,7 @@ public function render(): View|Closure|string
3536
@endphp
3637
3738
<li
39+
@class(['menu-disabled' => $disabled])
3840
x-data="
3941
{
4042
show: @if($submenuActive || $open) true @else false @endif,

0 commit comments

Comments
 (0)