import { ChevronDown, ChevronUp } from 'lucide-react'; import { CellProps, Column, HeaderProps } from 'react-table'; import { Button } from '@@/buttons'; export function buildExpandColumn>( isExpandable: (item: T) => boolean ): Column { return { id: 'expand', Header: ({ filteredFlatRows, getToggleAllRowsExpandedProps, isAllRowsExpanded, }: HeaderProps) => { const hasExpandableItems = filteredFlatRows.some((item) => isExpandable(item.original) ); return ( hasExpandableItems && (