- fix text truncation in badge component - simplify tag rendering in button component - remove padding in card component add space in actions
26 lines
749 B
PHP
26 lines
749 B
PHP
@props(['icon' => null, 'link' => null])
|
|
@if($link)
|
|
<a href="{{$link}}"
|
|
wire:navigate.hover
|
|
@else
|
|
<button
|
|
@endif
|
|
{{$attributes->twMerge(['class' => 'rounded-lg border border-gray-300 px-4 py-2 text-gray-700 active:scale-75 hover:bg-gray-100 transition duration-150 ease-in-out flex items-center justify-center min-w-20'])}}
|
|
/>
|
|
<div class="gap-2 flex items-center in-data-loading:hidden">
|
|
@if($icon)
|
|
<span class="block">
|
|
@svg($icon, 'w-4 h-4')
|
|
</span>
|
|
@endif
|
|
{{$slot}}
|
|
</div>
|
|
<div class="not-in-data-loading:hidden">
|
|
<x-lucide-loader class="animate-spin h-5"/>
|
|
</div>
|
|
@if($link)
|
|
</a>
|
|
@else
|
|
</button>
|
|
@endif
|