import { Button } from "@nextui-org/react"; import { Column } from "@tanstack/react-table"; import { ArrowDownIcon, ArrowUpIcon, ChevronsLeftRightIcon, } from "lucide-react"; import { HTMLAttributes } from "react"; interface DataTableColumnHeaderProps extends HTMLAttributes { column: Column; title: string; } export const DataTableColumnHeader = ({ column, title, className, }: DataTableColumnHeaderProps) => { const renderSortIcon = () => { const sort = column.getIsSorted(); if (!sort) { return ; } return sort === "desc" ? ( ) : ( ); }; if (!column.getCanSort()) { return
{title}
; } return (
); };