From 77a80e8d3a4c6d7781351c35440c0de08a065553 Mon Sep 17 00:00:00 2001 From: Pedro X Date: Tue, 22 Aug 2023 14:32:12 +0100 Subject: [PATCH 1/2] add nested menu dropdown --- src/app/View/Components/NestedMenuDropdown.php | 18 ++++++++++++++++++ .../components/nested-menu-dropdown.blade.php | 15 +++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/app/View/Components/NestedMenuDropdown.php create mode 100644 src/resources/views/ui/components/nested-menu-dropdown.blade.php diff --git a/src/app/View/Components/NestedMenuDropdown.php b/src/app/View/Components/NestedMenuDropdown.php new file mode 100644 index 0000000000..61141208bd --- /dev/null +++ b/src/app/View/Components/NestedMenuDropdown.php @@ -0,0 +1,18 @@ + + merge([ + 'class' => 'nav-link dropdown-toggle', + 'href' => $link ?? '#', + 'data-bs-toggle' => 'dropdown', + 'role' => 'button', + 'aria-expanded' => 'true' + ]) }}> + @if($icon)@endif + @if($title){{ $title }}@endif + + + From 429e4abf42c484eb8f743c4a6dcb8b8814b49dbd Mon Sep 17 00:00:00 2001 From: Pedro X Date: Wed, 23 Aug 2023 13:43:44 +0100 Subject: [PATCH 2/2] remove nested component --- src/app/View/Components/MenuDropdown.php | 1 + src/app/View/Components/NestedMenuDropdown.php | 18 ------------------ .../components/nested-menu-dropdown.blade.php | 15 --------------- 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 src/app/View/Components/NestedMenuDropdown.php delete mode 100644 src/resources/views/ui/components/nested-menu-dropdown.blade.php diff --git a/src/app/View/Components/MenuDropdown.php b/src/app/View/Components/MenuDropdown.php index 05519ac9dc..f2d7419b47 100644 --- a/src/app/View/Components/MenuDropdown.php +++ b/src/app/View/Components/MenuDropdown.php @@ -17,6 +17,7 @@ public function __construct( public ?string $link = null, public bool $open = false, public array $items = [], + public bool $nested = false, ) { } diff --git a/src/app/View/Components/NestedMenuDropdown.php b/src/app/View/Components/NestedMenuDropdown.php deleted file mode 100644 index 61141208bd..0000000000 --- a/src/app/View/Components/NestedMenuDropdown.php +++ /dev/null @@ -1,18 +0,0 @@ - - merge([ - 'class' => 'nav-link dropdown-toggle', - 'href' => $link ?? '#', - 'data-bs-toggle' => 'dropdown', - 'role' => 'button', - 'aria-expanded' => 'true' - ]) }}> - @if($icon)@endif - @if($title){{ $title }}@endif - - -