File size: 796 Bytes
5f32fbd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@php
    $base_class = 'lqd-legend flex items-center gap-2.5';
    $box_base_class = 'lqd-legend-box shrink-0 grow-0 rounded-full bg-primary';
    $label_base_class = 'lqd-legend-label';

    $variations = [
        'size' => [
            'sm' => 'lqd-legend-sm size-2',
            'sm' => 'lqd-legend-sm size-2',
            'md' => 'lqd-legend-md size-2.5',
        ],
    ];

    $size = isset($variations['size'][$size]) ? $variations['size'][$size] : $variations['size']['md'];
@endphp

<div {{ $attributes->withoutTwMergeClasses()->twMerge($base_class, $attributes->get('class')) }}>
    <span {{ $attributes->twMergeFor('box', $size, $box_base_class) }}></span>
    <span {{ $attributes->twMergeFor('label', $label_base_class) }}>
        {{ $label }}
    </span>
    {{ $slot }}
</div>