import { Dialog } from "@headlessui/react"; import { useRef } from "@wordpress/element"; import { __ } from "@wordpress/i18n"; import classnames from "classnames"; import { AnimatePresence, motion } from "framer-motion"; import { useGlobalState } from "../state/global"; import type { ExternalImage } from "../types"; import { ModalCloseButton } from "./ModalCloseButton"; import { ModalContent } from "./ModalContent"; import { Sidebar } from "./Sidebar"; type ModalProps = { open: boolean; setImage: (image: ExternalImage) => void; onClose: () => void; }; export const Modal = ({ open, onClose, setImage }: ModalProps) => { const initialFocus = useRef(null); const { currentTheme } = useGlobalState(); return ( {open && (
{__("Listing images", "unlimited-photos")}
)}
); };