Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Apr 27, 2024
1 parent f578d64 commit 282438c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 16 deletions.
33 changes: 23 additions & 10 deletions resources/views/actions/group.blade.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
<div {{ $attributes
->cssClass([
'layer' => 'flex items-center gap-3',
'layer' => 'flex items-center h-full',
'item' => 'py-3 border-b',
'active' => 'text-white border-white-500/80',
'inactive' => 'text-secondary-500 border-transparent',
])
->classMerge()
->withoutClass()
}}>
@foreach ($group->items as $action)
@if ($action->hasComponent())
<x-dynamic-component :component="$action->getComponent()" :$action />
@endif
<nav class="{{ $attributes->classFor('layer') }}">
@foreach ($group->items as $action)
<x-wireuse::actions-link
:$action
class="{{ $attributes->classFor('item') }}"
class:active="{{ $attributes->classFor('active') }}"
class:inactive="{{ $attributes->classFor('inactive') }}"
class:icon="{{ $attributes->classFor('icon') }}"
/>

@if ($action->hasLivewire())
@livewire($action->getLivewire(), compact('action'), key($action->getName()))
@endif
@endforeach
@if ($action?->hasComponent())
<x-dynamic-component :component="$action->getComponent()" :$action />
@endif

@if ($action?->hasLivewire())
@livewire($action->getLivewire(), ['action' => $action], key($action->getName()))
@endif
@endforeach
</nav>
</div>
2 changes: 1 addition & 1 deletion resources/views/navigation/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
->classMerge(['base', 'padding'])
}}>
@if ($start)
<div {{ $classFor('start') }}>
<div {{ $attributes->classFor('start') }}>
{{ $start }}
</div>
@endif
Expand Down
10 changes: 5 additions & 5 deletions resources/views/navigation/tabs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
])
->withoutClass()
}}>
<nav class="{{ $classFor('layer') }}">
<nav class="{{ $attributes->classFor('layer') }}">
@foreach ($navigation->items as $action)
<x-wireuse::actions-link
:$action
class="{{ $classFor('item') }}"
class:active="{{ $classFor('active') }}"
class:inactive="{{ $classFor('inactive') }}"
class:icon="{{ $classFor('icon') }}"
class="{{ $attributes->classFor('item') }}"
class:active="{{ $attributes->classFor('active') }}"
class:inactive="{{ $attributes->classFor('inactive') }}"
class:icon="{{ $attributes->classFor('icon') }}"
/>
@endforeach
</nav>
Expand Down

0 comments on commit 282438c

Please sign in to comment.