refactor: Improve label positioning in input and checkbox components

This commit is contained in:
Andras Bacsai
2024-09-24 21:04:04 +02:00
parent d6b4e33db3
commit 70dfa101ef
3 changed files with 38 additions and 38 deletions

View File

@@ -8,20 +8,20 @@
'hideLabel' => false,
])
<div class="flex flex-row items-center gap-4 px-2 py-1 form-control min-w-fit dark:hover:bg-coolgray-100">
@if(!$hideLabel)
<label class="flex gap-4 px-0 min-w-fit label">
<span class="flex gap-2">
@if ($label)
{!! $label !!}
@else
{{ $id }}
@endif
@if ($helper)
<x-helper :helper="$helper" />
@endif
</span>
</label>
<div class="flex flex-row items-center py-1 form-control min-w-fit dark:hover:bg-coolgray-100">
@if (!$hideLabel)
<label class="flex gap-4 px-0 min-w-fit label">
<span class="flex gap-2">
@if ($label)
{!! $label !!}
@else
{{ $id }}
@endif
@if ($helper)
<x-helper :helper="$helper" />
@endif
</span>
</label>
@endif
<span class="flex-grow"></span>
<input @disabled($disabled) type="checkbox" {{ $attributes->merge(['class' => $defaultClass]) }}