Skip to content

Commit

Permalink
refactor: allow dropdown content class override (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarnsley authored Apr 24, 2024
1 parent d798c7c commit 064bc0c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/views/dropdown.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'withPlacement' => false,
'withoutButton' => false,
'placementFallbacks' => null,
'contentClass' => 'py-1',
])

<div
Expand Down Expand Up @@ -96,7 +97,13 @@ class="flex items-center focus:outline-none dropdown-button transition-default {
@if ($height) data-height="{{ $height }}" @endif
>
<div class="{{ $dropdownContentClasses }}" x-cloak>
<div class="py-1" @if($closeOnClick ?? true) @click="{{ $dropdownProperty }} = !{{ $dropdownProperty }}" @endif>
<div
@class($contentClass)

@if($closeOnClick ?? true)
@click="{{ $dropdownProperty }} = !{{ $dropdownProperty }}"
@endif
>
{{ $slot }}
</div>
</div>
Expand Down

0 comments on commit 064bc0c

Please sign in to comment.