16 lines
454 B
PHP
16 lines
454 B
PHP
@props([
|
|
'name',
|
|
'label' => null,
|
|
])
|
|
@php $id = $attributes->get('id', $name); @endphp
|
|
<label for="{{ $id }}" class="inline-flex items-center gap-2 text-sm text-body select-none">
|
|
<input
|
|
id="{{ $id }}"
|
|
name="{{ $name }}"
|
|
type="checkbox"
|
|
{{ $attributes->merge(['class' => 'size-4 rounded border-line-strong text-accent-active']) }}
|
|
>
|
|
@if ($label)<span>{{ $label }}</span>@endif
|
|
{{ $slot }}
|
|
</label>
|