import type { Table } from "@tanstack/react-table"; import type { SVGComponent } from "@calcom/types/SVGComponent"; import { Button } from "../button"; interface DataTableSelectionBarProps { table: Table; actions?: { label: string; onClick: () => void; icon?: SVGComponent; }[]; } export function DataTableSelectionBar({ table, actions }: DataTableSelectionBarProps) { const numberOfSelectedRows = table.getSelectedRowModel().rows.length; if (numberOfSelectedRows === 0) return null; return (
{numberOfSelectedRows} selected
{actions?.map((action) => ( ))}
); }