import * as React from "react"; import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; import Typography from "@mui/material/Typography"; import Modal from "@mui/material/Modal"; import { GridSelectionModel } from "@mui/x-data-grid"; type DeleteModalProps = { open: boolean; handleClose: () => void; tariffDelete: (tarifIid: GridSelectionModel) => Promise; errorDelete: boolean; tariffId: GridSelectionModel; tariffName: string[]; }; export default function DeleteModal({ open, handleClose, tariffDelete, errorDelete, tariffId, tariffName, }: DeleteModalProps) { const onClickTariffDelete = () => { if (errorDelete) { return; } tariffDelete(tariffId); handleClose(); }; return (
Вы уверены, что хотите удалить тариф Тариф: {tariffName.map((name, index) => ( {name}; ))}
); }