"use client"
import { ContextMenu } from "@/components/ui/preskok-ui/context-menu"
export function ContextMenuPreskokDemo() {
return (
<ContextMenu>
<ContextMenu.Trigger className="rounded border px-3 py-2">
Right click me
</ContextMenu.Trigger>
<ContextMenu.Content>
<ContextMenu.Item>Copy</ContextMenu.Item>
<ContextMenu.Item>Paste</ContextMenu.Item>
<ContextMenu.Separator />
<ContextMenu.Item isDanger>Delete</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu>
)
}
Installation
pnpmnpmyarnbunpnpm dlx @preskok-org/ui@latest add context-menu
Usage
import { ContextMenu } from "@/registry/preskok/ui/preskok-ui/context-menu"
export function ContextMenuDemo() {
return (
<ContextMenu>
<ContextMenu.Trigger className="rounded border px-3 py-2">
Right click me
</ContextMenu.Trigger>
<ContextMenu.Content>
<ContextMenu.Item>Copy</ContextMenu.Item>
<ContextMenu.Item>Paste</ContextMenu.Item>
<ContextMenu.Separator />
<ContextMenu.Item intent="danger">Delete</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu>
)
}