generated from boboko/starter
22 lines
728 B
PHP
22 lines
728 B
PHP
@props([
|
|
'options' => [],
|
|
'value' => null,
|
|
'name' => null,
|
|
'ariaLabel' => null,
|
|
])
|
|
|
|
|
|
<div class="relative inline-flex items-center">
|
|
<select
|
|
@if($name) name="{{ $name }}" @endif
|
|
@if($ariaLabel) aria-label="{{ $ariaLabel }}" @endif
|
|
{{ $attributes->merge(['class' => 'appearance-none bg-transparent border-b border-black pr-10 py-2.5 cursor-pointer focus:outline-none']) }}
|
|
>
|
|
@foreach($options as $option)
|
|
<option value="{{ $option['value'] }}" @selected($value === $option['value'])>{{ $option['label'] }}</option>
|
|
@endforeach
|
|
</select>
|
|
|
|
<x-ui.icon name="arrow-down" :size="16" class="pointer-events-none absolute right-4" />
|
|
</div>
|