lasthourcloud/resources/views/components/inputs/select.blade.php
2023-05-04 10:45:09 +02:00

26 lines
485 B
PHP

@props([
'id' => null,
'label' => null,
'required' => false,
])
<span @class(['flex flex-col'])>
<label for={{ $id }}>
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($required)
*
@endif
</label>
<select {{ $attributes }} wire:model.defer={{ $id }}>
{{ $slot }}
</select>
@error($id)
<div class="text-red-500">{{ $message }}</div>
@enderror
</span>