pianello-api/resources/views/components/base/form-select/index.blade.php
Ale Gallo 96c0bfb8ce Committing laravel (part 5)
committing blade templating files and components that might come in handy
2023-11-10 16:41:20 +01:00

19 lines
1 KiB
PHP

@props(['formSelectSize' => null])
@aware(['formInline' => null])
<select
data-tw-merge
{{ $attributes->class(
merge([
'disabled:bg-slate-100 disabled:cursor-not-allowed disabled:dark:bg-darkmode-800/50',
'[&[readonly]]:bg-slate-100 [&[readonly]]:cursor-not-allowed [&[readonly]]:dark:bg-darkmode-800/50',
'transition duration-200 ease-in-out w-full text-sm border-slate-200 shadow-sm rounded-md py-2 px-3 pr-8 focus:ring-4 focus:ring-primary focus:ring-opacity-20 focus:border-primary focus:border-opacity-40 dark:bg-darkmode-800 dark:border-transparent dark:focus:ring-slate-700 dark:focus:ring-opacity-50',
$formSelectSize == 'sm' ? 'text-xs py-1.5 pl-2 pr-8' : null,
$formSelectSize == 'lg' ? 'text-lg py-1.5 pl-4 pr-8' : null,
$formInline ? 'flex-1' : null,
$attributes->whereStartsWith('class')->first(),
]),
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
>
{{ $slot }}
</select>