mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-28 07:43:18 +00:00
26 lines
653 B
PHP
26 lines
653 B
PHP
@props([
|
|
'variant' => null,
|
|
'size' => null,
|
|
'name' => null,
|
|
])
|
|
|
|
@php
|
|
// We only want to show the name attribute on the checkbox if it has been set
|
|
// manually, but not if it has been set from the wire:model attribute...
|
|
$showName = isset($name);
|
|
|
|
if (! isset($name)) {
|
|
$name = $attributes->whereStartsWith('wire:model')->first();
|
|
}
|
|
|
|
$classes = Flux::classes()
|
|
->add('flex flex-wrap gap-2')
|
|
;
|
|
@endphp
|
|
|
|
<flux:with-field :$attributes>
|
|
<ui-checkbox-group {{ $attributes->class($classes) }} @if($showName) name="{{ $name }}" @endif data-flux-checkbox-group-buttons>
|
|
{{ $slot }}
|
|
</ui-checkbox-group>
|
|
</flux:with-field>
|