"use client"; import classNames from "classnames"; import { toast } from "sonner"; import { cn } from "@/lib/utils"; import { GridPattern } from "@/components/magic-ui/grid-pattern"; export const Preview = ({ html, isResizing, isAiWorking, ref, device, currentTab, iframeRef, }: { html: string; isResizing: boolean; isAiWorking: boolean; ref: React.RefObject; iframeRef?: React.RefObject; device: "desktop" | "mobile"; currentTab: string; }) => { return (
{ if (isAiWorking) { e.preventDefault(); e.stopPropagation(); toast.warning("Please wait for the AI to finish working."); } }} >