@once @push('styles') @endpush @endonce @props([ 'category', 'class' => '', 'size' => 48, 'rounded' => false, 'variant' => 'list', ]) @php $thumb = $category->thumbnailMeta(); $size = (int) ($size ?? 48); $classes = trim('cat-thumb cat-thumb--' . ($variant ?: 'list') . ' ' . ($class ?? '')); if ($rounded) { $classes .= ' cat-thumb--round'; } $style = "width:{$size}px;height:{$size}px;min-width:{$size}px;min-height:{$size}px;max-width:{$size}px;max-height:{$size}px;--cat-thumb-size:{$size}px;"; @endphp
@if($thumb['type'] === 'image') {{ $thumb['alt'] ?? $category->name }} @elseif($thumb['type'] === 'icon') @else {{ $thumb['label'] }} @endif