Added category colors next to options

This commit is contained in:
merve karaman 2024-05-06 18:11:27 +03:00 committed by GitHub
parent b19ca1c593
commit 13d7549a0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 32 additions and 4 deletions

View File

@ -20,7 +20,14 @@
:disabled="$disabled"
{{ $attributes }}
/>
>
<template #option="{option}">
<div class="flex items-center">
<span class="w-5 h-4 rounded-full" style="background-color:red !important;"></span>
<span> @{{ option.value }}</span>
</div>
</template>
</x-form.group.select>
@elseif (($attributes->has('withoutRemote') && $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
<x-form.group.select
add-new
@ -40,7 +47,14 @@
:disabled="$disabled"
{{ $attributes }}
/>
>
<template #option="{option}">
<div class="flex items-center">
<span class="w-5 h-4 rounded-full" style="background-color:red !important;"></span>
<span> @{{ option.value }}</span>
</div>
</template>
</x-form.group.select>
@elseif ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && ($attributes->has('withoutAddNew') && $attributes->has('without-add-new')))
<x-form.group.select
remote
@ -60,7 +74,14 @@
:disabled="$disabled"
{{ $attributes }}
/>
>
<template #option="{option}">
<div class="flex items-center">
<span class="w-5 h-4 rounded-full" style="background-color:red !important;"></span>
<span> @{{ option.value }}</span>
</div>
</template>
</x-form.group.select>
@else
<x-form.group.select
name="{{ $name }}"
@ -77,5 +98,12 @@
:disabled="$disabled"
{{ $attributes }}
/>
>
<template #option="{option}">
<div class="flex items-center">
<span class="w-5 h-4 rounded-full" style="background-color:red !important;"></span>
<span> @{{ option.value }}</span>
</div>
</template>
</x-form.group.select>
@endif