Updated api usage, corrected table designs
This commit is contained in:
@@ -108,12 +108,15 @@ export const SortableTh: React.FC<SortableThProps> = ({
|
||||
...props
|
||||
}) => {
|
||||
const isCurrent = currentColumn === column && direction !== null;
|
||||
const hasPadding = className.includes('p-') || className.includes('py-') || className.includes('px-');
|
||||
const defaultPadding = hasPadding ? '' : 'py-3.5 px-4';
|
||||
const defaultWhitespace = className.includes('whitespace-') ? '' : 'whitespace-nowrap';
|
||||
|
||||
return (
|
||||
<th
|
||||
{...props}
|
||||
onClick={() => onSort(column)}
|
||||
className={`cursor-pointer select-none group transition-colors hover:text-white ${className}`}
|
||||
className={`cursor-pointer select-none group transition-colors hover:text-white ${defaultPadding} ${defaultWhitespace} ${className}`.trim()}
|
||||
title={`Click to sort (Ascending, Descending, Clear)`}
|
||||
>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user