diff --git a/src/client/components/table/TableBulkActionBar.tsx b/src/client/components/table/TableBulkActionBar.tsx new file mode 100644 index 0000000..2890d0e --- /dev/null +++ b/src/client/components/table/TableBulkActionBar.tsx @@ -0,0 +1,129 @@ +import { ChevronDown, Download, Loader2, X } from "lucide-react"; +import type { ReactNode } from "react"; + +export function TableBulkActionBar({ + selectedCount, + selectedLabel = "selected", + actions, + onClear, + placement = "fixed", +}: { + selectedCount: number; + selectedLabel?: string; + actions: ReactNode; + onClear: () => void; + placement?: "fixed" | "inline"; +}) { + if (selectedCount === 0) return null; + + const wrapperClass = + placement === "fixed" + ? "pointer-events-none fixed inset-x-0 bottom-6 z-30 flex justify-center px-4" + : "flex justify-center"; + const toolbarClass = + placement === "fixed" + ? "pointer-events-auto flex items-stretch overflow-visible rounded-xl border border-base-content/15 bg-base-300/85 shadow-2xl backdrop-blur" + : "flex items-stretch overflow-visible rounded-xl border border-base-content/15 bg-base-200"; + + return ( +