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

26 lines
1.3 KiB
PHP
Raw Normal View History

2023-07-13 11:16:24 +00:00
<div class="w-full">
2023-06-12 10:00:01 +00:00
@if ($label)
<div class="mb-1.5 flex h-4 w-full items-center gap-1.5">
<label
class="mb-0! flex items-center gap-1 text-sm font-medium leading-4 {{ $disabled ? 'text-neutral-600' : '' }}">{{ $label }}
@if ($required)
<x-highlighted text="*" />
@endif
</label>
2023-07-13 11:16:24 +00:00
@if ($helper)
2023-08-11 18:19:42 +00:00
<x-helper :helper="$helper" />
2023-07-13 11:16:24 +00:00
@endif
</div>
2023-06-12 10:00:01 +00:00
@endif
<select {{ $attributes->merge(['class' => $defaultClass]) }} @disabled($disabled) @required($required)
wire:loading.attr="disabled" name={{ $modelBinding }} id="{{ $htmlId }}"
@if ($attributes->whereStartsWith('wire:model')->first()) {{ $attributes->whereStartsWith('wire:model')->first() }} wire:dirty.class="[box-shadow:inset_4px_0_0_#d52b1f,inset_0_0_0_2px_#e7e5e4] dark:[box-shadow:inset_4px_0_0_#fde047,inset_0_0_0_2px_#292524]" @else wire:model={{ $modelBinding }} wire:dirty.class="[box-shadow:inset_4px_0_0_#d52b1f,inset_0_0_0_2px_#e7e5e4] dark:[box-shadow:inset_4px_0_0_#fde047,inset_0_0_0_2px_#292524]" @endif>
2023-05-04 08:45:09 +00:00
{{ $slot }}
</select>
@error($modelBinding)
2023-08-11 18:19:42 +00:00
<label class="label">
<span class="text-red-500 label-text-alt">{{ $message }}</span>
</label>
2023-08-11 14:13:53 +00:00
@enderror
2023-06-05 11:50:34 +00:00
</div>