Files
LauckCycles/resources/views/components/forms/select.blade.php
T

13 lines
659 B
PHP

@props(['disabled' => false, 'options', 'error' => null])
<select {{ $disabled ? 'disabled' : ''}} {!! $attributes->merge(['class' => 'bg-neutral-800 border-neutral-700 text-white text-sm rounded-lg focus:ring-neon-lime focus:border-neon-lime block w-full p-2.5 placeholder-gray-500 transition-colors ' . ($error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : '')]) !!}>
<option value="">Seleccione</option>
@if ($options)
@foreach ($options as $key => $op)
<option value={{$key}}>{{$op}}</option>
@endforeach
@endif
</select>
@if($error)
<p class="mt-1 text-xs text-red-400">{{ $error }}</p>
@endif