28 lines
644 B
PHP
Raw Normal View History

2023-05-04 10:45:09 +02:00
@props([
'id' => null,
'label' => null,
'required' => false,
])
2023-05-18 13:26:35 +02:00
<span {{ $attributes->merge(['class' => 'flex flex-col']) }}>
2023-06-05 12:07:55 +02:00
<label class="label" for={{ $id }}>
<span class="label-text">
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($required)
<span class="text-warning">*</span>
@endif
</span>
2023-05-04 10:45:09 +02:00
</label>
<select {{ $attributes }} wire:model.defer={{ $id }}>
{{ $slot }}
</select>
@error($id)
<div class="text-red-500">{{ $message }}</div>
@enderror
</span>