Replace ghost action links with shared btn components in Queue.
Deploy Ladill Queue / deploy (push) Successful in 1m6s
Deploy Ladill Queue / deploy (push) Successful in 1m6s
Aligns kiosk, appointment, queue, and admin destructive actions with the Frontdesk pill-button pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
@props([
|
||||
'variant' => 'primary',
|
||||
'href' => null,
|
||||
'type' => 'button',
|
||||
'size' => null,
|
||||
'plain' => false,
|
||||
])
|
||||
|
||||
@php
|
||||
$tag = $href ? 'a' : 'button';
|
||||
|
||||
$variantClass = match ($variant) {
|
||||
'secondary' => 'btn-secondary',
|
||||
'warning' => 'btn-warning',
|
||||
'danger' => 'btn-danger',
|
||||
'link' => 'btn-link',
|
||||
default => 'btn-primary',
|
||||
};
|
||||
|
||||
$classes = collect([
|
||||
$variantClass,
|
||||
$size === 'sm' ? 'btn-sm' : null,
|
||||
($plain && $variant === 'link') ? 'btn-link-plain' : null,
|
||||
($plain && $variant === 'danger') ? 'btn-danger-plain' : null,
|
||||
])->filter()->implode(' ');
|
||||
@endphp
|
||||
|
||||
<{{ $tag }}
|
||||
@if ($href) href="{{ $href }}" @endif
|
||||
@if ($tag === 'button') type="{{ $type }}" @endif
|
||||
{{ $attributes->class([$classes]) }}
|
||||
>
|
||||
{{ $slot }}
|
||||
</{{ $tag }}>
|
||||
@@ -0,0 +1,12 @@
|
||||
@props([
|
||||
'title' => null,
|
||||
])
|
||||
|
||||
<div {{ $attributes->class(['mt-6 space-y-3 rounded-2xl border border-slate-200 bg-slate-50/80 p-4']) }}>
|
||||
@if ($title)
|
||||
<p class="text-xs font-semibold uppercase tracking-wide text-slate-500">{{ $title }}</p>
|
||||
@endif
|
||||
<div class="flex flex-col items-start gap-2 sm:flex-row sm:flex-wrap sm:gap-3">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user