45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
{{-- Credit: Lucide (https://lucide.dev) --}}
|
|
|
|
@props([
|
|
'variant' => 'outline',
|
|
])
|
|
|
|
@php
|
|
if ($variant === 'solid') {
|
|
throw new \Exception('The "solid" variant is not supported in Lucide.');
|
|
}
|
|
|
|
$classes = Flux::classes('shrink-0')
|
|
->add(match($variant) {
|
|
'outline' => '[:where(&)]:size-6',
|
|
'solid' => '[:where(&)]:size-6',
|
|
'mini' => '[:where(&)]:size-5',
|
|
'micro' => '[:where(&)]:size-4',
|
|
});
|
|
|
|
$strokeWidth = match ($variant) {
|
|
'outline' => 2,
|
|
'mini' => 2.25,
|
|
'micro' => 2.5,
|
|
};
|
|
@endphp
|
|
|
|
<svg
|
|
{{ $attributes->class($classes) }}
|
|
data-flux-icon
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="{{ $strokeWidth }}"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
aria-hidden="true"
|
|
data-slot="icon"
|
|
>
|
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
<path d="M12 18v-6" />
|
|
<path d="m9 15 3 3 3-3" />
|
|
</svg>
|