import React from "react";

import Button from "@mui/material/Button";

import { useCardContext } from "../../contexts/CardContext";
import { useI18n } from "../../contexts/I18nContext";

export const CardCancelButton: React.FC = () => {
  const { setIsEditing } = useCardContext();
  const { t } = useI18n();
  return (
    <Button size="medium" variant="outlined" onClick={() => setIsEditing(false)}>
      {t("Cancel")}
    </Button>
  );
};

export default CardCancelButton;
