coolify/resources/views/components/forms/checkbox.blade.php

18 lines
773 B
PHP
Raw Normal View History

<div class="px-2 form-control min-w-fit hover:bg-coolgray-100">
2023-07-28 09:10:35 +02:00
<label class="flex gap-4 px-0 cursor-pointer label">
2023-07-13 13:16:24 +02:00
<span class="flex gap-2 label-text min-w-fit">
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($helper)
<x-helper :helper="$helper" />
2023-07-13 13:16:24 +02:00
@endif
</span>
<input @disabled($disabled) type="checkbox" {{ $attributes->merge(['class' => $defaultClass]) }}
2023-09-07 13:23:34 +02:00
@if ($instantSave) wire:loading.attr="disabled" wire:click='{{ $instantSave === 'instantSave' || $instantSave == '1' ? 'instantSave' : $instantSave }}'
2023-12-07 19:06:32 +01:00
wire:model={{ $id }} @else wire:model={{ $value ?? $id }} @endif />
2023-07-13 13:16:24 +02:00
</label>
2023-06-14 13:07:58 +02:00
</div>