@props([
'sortable' => false,
'sortBy' => null,
'currentSort' => null,
'sortDirection' => null,
'align' => 'left',
])
@php
$alignClasses = [
'left' => 'text-left',
'center' => 'text-center',
'right' => 'text-right',
];
$isSorted = $sortable && $currentSort === $sortBy;
@endphp
merge([
'class' =>
'px-4 py-3 text-sm font-semibold tracking-wider text-gray-700 uppercase bg-gray-50 ' .
($alignClasses[$align] ?? 'text-left'),
]) }}>
@if ($sortable && $sortBy)
@else
{{ $slot }}
@endif
|