import { useState } from "react"; import { t } from "../i18n"; import { useDeviceType } from "./App"; import { trash } from "./icons"; import { ToolButton } from "./ToolButton"; import ConfirmDialog from "./ConfirmDialog"; const ClearCanvas = ({ onConfirm }: { onConfirm: () => void }) => { const [showDialog, setShowDialog] = useState(false); const toggleDialog = () => { setShowDialog(!showDialog); }; return ( <> {showDialog && ( { onConfirm(); toggleDialog(); }} onCancel={toggleDialog} title={t("clearCanvasDialog.title")} >

{t("alerts.clearReset")}

)} ); }; export default ClearCanvas;