snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
51
apps/v4/examples/aria/context-menu-destructive.tsx
Normal file
51
apps/v4/examples/aria/context-menu-destructive.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
"use client"
|
||||
|
||||
import { ArchiveIcon, PencilIcon, ShareIcon, TrashIcon } from "lucide-react"
|
||||
import { Pressable } from "react-aria-components"
|
||||
|
||||
import {
|
||||
ContextMenu,
|
||||
ContextMenuGroup,
|
||||
ContextMenuItem,
|
||||
ContextMenuSeparator,
|
||||
ContextMenuTrigger,
|
||||
} from "@/styles/aria-nova/ui/context-menu"
|
||||
|
||||
export function ContextMenuDestructive() {
|
||||
return (
|
||||
<ContextMenuTrigger>
|
||||
<Pressable>
|
||||
<div
|
||||
role="button"
|
||||
className="flex aspect-video w-full max-w-xs items-center justify-center rounded-xl border border-dashed text-sm"
|
||||
>
|
||||
<span className="hidden pointer-fine:inline-block">
|
||||
Right click here
|
||||
</span>
|
||||
<span className="hidden pointer-coarse:inline-block">
|
||||
Long press here
|
||||
</span>
|
||||
</div>
|
||||
</Pressable>
|
||||
<ContextMenu>
|
||||
<ContextMenuGroup>
|
||||
<ContextMenuItem>
|
||||
<PencilIcon />
|
||||
Edit
|
||||
</ContextMenuItem>
|
||||
<ContextMenuItem>
|
||||
<ShareIcon />
|
||||
Share
|
||||
</ContextMenuItem>
|
||||
</ContextMenuGroup>
|
||||
<ContextMenuSeparator />
|
||||
<ContextMenuGroup>
|
||||
<ContextMenuItem variant="destructive">
|
||||
<TrashIcon />
|
||||
Delete
|
||||
</ContextMenuItem>
|
||||
</ContextMenuGroup>
|
||||
</ContextMenu>
|
||||
</ContextMenuTrigger>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user