Skip to content

Commit 3a0c279

Browse files
committed
Return attributes as component attribute bag
1 parent 2e4b0b7 commit 3a0c279

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/framework/src/Framework/Features/Navigation/NavigationItem.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Hyde\Hyde;
1010
use Hyde\Support\Models\Route;
1111
use Stringable;
12+
use Illuminate\View\ComponentAttributeBag;
1213

1314
use function is_string;
1415

@@ -120,8 +121,8 @@ protected static function make(Route|string $destination, ?string $label = null,
120121
return [$destination, $label ?? $destination, $priority ?? NavigationMenu::DEFAULT];
121122
}
122123

123-
public function getAttributes(): array
124+
public function getAttributes(): ComponentAttributeBag
124125
{
125-
return $this->attributes;
126+
return new ComponentAttributeBag($this->attributes);
126127
}
127128
}

0 commit comments

Comments
 (0)