Mercurial > packages > framework
comparison publishable/resources/views/components/form/select.blade.php @ 4:84c75d9d90be
Changing usage to be bootstrap 5, not everything is reviewed but it's been started
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 20:33:35 -0400 |
| parents | b44434aaa767 |
| children |
comparison
equal
deleted
inserted
replaced
| 3:e107504fa22c | 4:84c75d9d90be |
|---|---|
| 1 @props(['name', 'label', 'options' => [], 'value' => '', 'required' => false]) | 1 @props(['name', 'label', 'options' => [], 'value' => '', 'required' => false]) |
| 2 <div class="mb-4"> | 2 <div class="mb-3"> |
| 3 <label for="{{ $name }}" class="block text-gray-700">{{ $label }}</label> | 3 <label for="{{ $name }}" class="form-label">{{ $label }}</label> |
| 4 <select name="{{ $name }}" id="{{ $name }}" @if ($required) required @endif | 4 <select name="{{ $name }}" id="{{ $name }}" @if ($required) required @endif |
| 5 class="mt-1 block w-full rounded border-gray-300 shadow-sm focus:ring focus:ring-blue-200"> | 5 class="form-select"> |
| 6 <option value="">Select...</option> | 6 <option value="">Select...</option> |
| 7 @foreach ($options as $optionValue => $optionLabel) | 7 @foreach ($options as $optionValue => $optionLabel) |
| 8 <option value="{{ $optionValue }}" {{ old($name, $value) == $optionValue ? 'selected' : '' }}> | 8 <option value="{{ $optionValue }}" {{ old($name, $value) == $optionValue ? 'selected' : '' }}> |
| 9 {{ $optionLabel }} | 9 {{ $optionLabel }} |
| 10 </option> | 10 </option> |
| 11 @endforeach | 11 @endforeach |
| 12 </select> | 12 </select> |
| 13 @error($name) | 13 @error($name) |
| 14 <span class="text-red-600 text-sm">{{ $message }}</span> | 14 <div class="text-danger small">{{ $message }}</div> |
| 15 @enderror | 15 @enderror |
| 16 </div> | 16 </div> |
