Skip to content

How would I nest Tooltip inside Alert Dialog? (getting error: Function components cannot be given refs) #2813

Closed Answered by ben-xD
ben-xD asked this question in Help
Discussion options

You must be logged in to vote

Following https://www.radix-ui.com/primitives/docs/guides/composition, I ended up with:

import React from "react";
import { Button } from "@/components/ui/button.tsx";
import { RotateCw } from "lucide-react";
import { cn } from "@/lib/utils";
import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogPortal,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "@/components/ui/tooltip.tsx";
import { TooltipPortal } from "@radix-ui/react-tooltip";

export const ActionButton = 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ben-xD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant