import clsx from "clsx"; import { ReactNode, useState } from "react"; import { renderSanitizedMarkdown } from "~/utils/html-sanitizer"; import ButtonSecondary from "../buttons/ButtonSecondary"; import Modal from "../modals/Modal"; import { useTranslation } from "react-i18next"; export default function ShowHtmlModalButton({ html, title, link, size, }: { html: string | undefined | null; title: React.ReactNode; link?: { href: string; target?: undefined | "_blank"; text?: ReactNode; }; className?: string; size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "full"; }) { const { t } = useTranslation(); const [open, setOpen] = useState(false); return ( <>
{title ?? t("shared.details")}
{link && ( {link.text} )}
); }