UNPKG

stackpress

Version:

Incept is a content management framework.

13 lines (12 loc) 1.01 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useLanguage } from 'r22n'; import Button from 'frui/form/Button'; const ModalConfirm = ({ open, message, confirmed }) => { const { _ } = useLanguage(); return (_jsxs("div", { className: "p-4 mt-2 border-t border-[#1F2937]", children: [_jsx("p", { className: "text-lg", children: message }), _jsx("p", { className: "text-[#666666] dark:text-[#DDDDDD]", children: _('This action cannot be undone.') }), _jsxs(Button, { success: true, className: "mt-4 rounded-lg uppercase font-semibold px-mr-10", onClick: () => { open(false); confirmed(); ; }, children: [_jsx("i", { className: "fas fa-fw fa-check px-mr-5" }), _('Confirm')] }), _jsxs(Button, { error: true, className: "mt-4 rounded-lg uppercase font-semibold", onClick: () => open(false), children: [_jsx("i", { className: "fas fa-fw fa-ban px-mr-5" }), _('Cancel')] })] })); }; export default ModalConfirm;