mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-28 07:43:18 +00:00
34 lines
777 B
PHP
34 lines
777 B
PHP
@props([
|
|
'invalid' => null,
|
|
'clear' => null,
|
|
'close' => null,
|
|
'size' => null,
|
|
'name' => null,
|
|
])
|
|
|
|
@php
|
|
// We only want to show the name attribute on the checkbox if it has been set
|
|
// manually, but not if it has been set from the wire:model attribute...
|
|
$showName = isset($name);
|
|
|
|
if (! isset($name)) {
|
|
$name = $attributes->whereStartsWith('wire:model')->first();
|
|
}
|
|
|
|
$invalid ??= ($name && $errors->has($name));
|
|
|
|
$class = Flux::classes()
|
|
->add('w-full');
|
|
@endphp
|
|
|
|
<ui-select
|
|
clear="{{ $clear ?? 'close esc select' }}"
|
|
@if ($close) close="{{ $close }}" @endif
|
|
{{ $attributes->class($class)->merge(['filter' => true]) }}
|
|
@if($showName) name="{{ $name }}" @endif
|
|
data-flux-control
|
|
data-flux-select
|
|
>
|
|
{{ $slot}}
|
|
</ui-select>
|