sackey e839d40a99
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Initial commit
2025-07-30 17:15:50 +00:00

23 lines
737 B
PHP

@php
$classes = Flux::classes()
->add('*:data-flux-field:mb-3')
->add('[&>[data-flux-field]:has(>[data-flux-description])]:mb-4')
->add('[&>[data-flux-field]:last-child]:mb-0!')
;
// Support adding the .self modifier to the wire:model directive...
if (($wireModel = $attributes->wire('model')) && $wireModel->directive && ! $wireModel->hasModifier('self')) {
unset($attributes[$wireModel->directive]);
$wireModel->directive .= '.self';
$attributes = $attributes->merge([$wireModel->directive => $wireModel->value]);
}
@endphp
<flux:with-field :$attributes>
<ui-checkbox-group {{ $attributes->class($classes) }} data-flux-checkbox-group>
{{ $slot }}
</ui-checkbox-group>
</flux:with-field>