@php if ($attributes->has('x-data') || $attributes->has('x-tooltip')) { throw new Exception('The "x-data" and "x-tooltip" attributes are reserved for the icon component.'); } if (isset($tooltip)) { $escapedTooltip = addslashes($tooltip); $alpineData = "{ tooltip: '$escapedTooltip' }"; $alpineTooltip = "tooltip"; } else { $alpineData = null; $alpineTooltip = null; } $sizeClasses = match ($attributes->get('size')) { 'sm' => 'p-1 inline-flex items-center justify-center w-8 h-8 rounded', default => 'p-3 rounded-lg', }; @endphp
@isset($icon) merge([ 'class' => $colors, 'fill' => 'none', 'stroke' => 'currentColor', 'viewBox' => '0 0 24 24', ]) }} :size="\Filament\Support\Enums\IconSize::Large" /> @else merge([ 'class' => $colors, 'fill' => 'none', 'stroke' => 'currentColor', 'viewBox' => '0 0 24 24', ]) }}> {{ $slot }} @endisset