import React from "react";
import { useDisclosure } from "@mantine/hooks";
import { Button, Modal, Text, Flex, ButtonVariant } from "@mantine/core";
export const ConfirmDialogButton: React.FC<{
text: string;
buttonText: string;
buttonColor: string;
onConfirm: () => void;
children: React.ReactNode;
variant?: ButtonVariant;
}> = ({
text,
buttonText,
buttonColor,
onConfirm,
children,
variant = "filled",
}) => {
const [opened, { open, close }] = useDisclosure();
const handleConfirm = React.useCallback(() => {
close();
onConfirm();
}, [close, onConfirm]);
return (
<>
{text}
>
);
};