@php $props = ['gap', 'justify', 'nowrap', 'grow']; @endphp @php $gap = $attributes->get('gap', 0); $justify = $attributes->get('justify', 'start'); $isWrapping = $attributes->has('nowrap'); $isGrowing = $attributes->has('grow'); $attributes = $attributes->except($props); $defaultClass = 'Group flex items-center gap-' . $gap . ' justify-' . $justify; @endphp
twMerge( $defaultClass . (!$isWrapping ? ' flex-wrap' : '') . ($isGrowing ? ' [&>*]:flex-1' : ''), ) }}> {{ $slot }}