"use client"; import { Button } from "@azmr/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@azmr/ui/menu"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@azmr/ui/modal"; import { useState } from "react"; // Open a dialog from a menu item: control the dialog and open it from the item's onClick. The // dialog sits next to the menu, not inside it, so it survives the menu closing. export default function MenuOpensDialog() { const [confirming, setConfirming] = useState(false); const [deleted, setDeleted] = useState(false); return (
More} /> Duplicate setConfirming(true)}> Delete… Delete this item? This cannot be undone. Keep it setDeleted(true)}>Delete

{deleted ? "Deleted." : "Choose Delete… to confirm."}

); }