opt-table
Version:
A Responsive and Customizable Rich Table
16 lines • 1.37 kB
JavaScript
import { Button, ButtonGroup, Dialog, Grid, Slide, } from "@mui/material";
import React from "react";
const DeleteMenuModal = ({ props, title_component, onYesClick, options, }) => {
return (React.createElement(Dialog, Object.assign({}, props, { TransitionComponent: UpTransition }),
React.createElement(Grid, { item: true, xs: 12 },
React.createElement(Grid, { item: true, xs: 12 }, title_component),
React.createElement(Grid, { item: true, xs: 12, container: true, justifyContent: "flex-end", marginTop: 2 },
React.createElement(ButtonGroup, { variant: "text" },
React.createElement(Button, { onClick: (e) => { var _a; return (_a = props === null || props === void 0 ? void 0 : props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e, "escapeKeyDown"); } }, (options === null || options === void 0 ? void 0 : options.modal_no_title) || "خیر"),
React.createElement(Button, { onClick: () => onYesClick() }, (options === null || options === void 0 ? void 0 : options.modal_yes_title) || "بله"))))));
};
export default DeleteMenuModal;
export const UpTransition = React.forwardRef(function Transition(props, ref) {
return React.createElement(Slide, Object.assign({ direction: "up", ref: ref }, props));
});
//# sourceMappingURL=delete_modal.js.map