coolify/resources/views/components/forms/select.blade.php

23 lines
926 B
PHP
Raw Normal View History

2023-07-13 13:16:24 +02:00
<div class="w-full">
2023-06-12 12:00:01 +02:00
@if ($label)
2023-07-28 09:10:35 +02:00
<label for="small-input" class="flex items-center gap-1 mb-1 text-sm font-medium">{{ $label }}
2023-07-13 13:16:24 +02:00
@if ($required)
2023-08-22 17:44:49 +02:00
<x-highlighted text="*" />
2023-07-13 13:16:24 +02:00
@endif
@if ($helper)
2023-08-11 20:19:42 +02:00
<x-helper :helper="$helper" />
2023-07-13 13:16:24 +02:00
@endif
2023-06-12 12:00:01 +02:00
</label>
@endif
2023-08-11 20:19:42 +02:00
<select {{ $attributes->merge(['class' => $defaultClass]) }} @required($required) wire:dirty.class.remove='text-white'
2023-07-13 13:16:24 +02:00
wire:dirty.class="text-black bg-warning" wire:loading.attr="disabled" name={{ $id }}
2023-07-13 22:03:27 +02:00
@if ($attributes->whereStartsWith('wire:model')->first()) {{ $attributes->whereStartsWith('wire:model')->first() }} @else wire:model.defer={{ $id }} @endif>
2023-05-04 10:45:09 +02:00
{{ $slot }}
</select>
2023-08-11 16:13:53 +02:00
@error($id)
2023-08-11 20:19:42 +02:00
<label class="label">
<span class="text-red-500 label-text-alt">{{ $message }}</span>
</label>
2023-08-11 16:13:53 +02:00
@enderror
2023-06-05 13:50:34 +02:00
</div>