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