VideoChain-UI / src /components /business /tasks /data-table-row-actions.tsx
jbilcke-hf's picture
jbilcke-hf HF staff
ready for release (sort of)
43dd1ac
raw
history blame
1.17 kB
"use client"
import { DotsHorizontalIcon } from "@radix-ui/react-icons"
import { Row } from "@tanstack/react-table"
import { Button } from "@/components/ui/button"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import { VideoTask } from "@/app/types"
export function DataTableRowActions({
row,
}: {
row: Row<VideoTask>
}) {
const task = row.original
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
className="flex h-8 w-8 p-0 data-[state=open]:bg-muted"
>
<DotsHorizontalIcon className="h-4 w-4" />
<span className="sr-only">Open menu</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-[160px]">
<DropdownMenuItem>Download</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
Delete
<DropdownMenuShortcut>⌘⌫</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
}