@blocklet/payment-react
Version:
Reusable react components for payment kit v2
99 lines (98 loc) • 2.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
module.exports = ServiceSuspendedDialog;
var _jsxRuntime = require("react/jsx-runtime");
var _material = require("@mui/material");
var _styles = require("@mui/material/styles");
var _PauseCircleOutline = _interopRequireDefault(require("@mui/icons-material/PauseCircleOutline"));
var _context = require("@arcblock/ux/lib/Locale/context");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function ServiceSuspendedDialog({
open,
onClose
}) {
const {
t
} = (0, _context.useLocaleContext)();
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Dialog, {
open,
onClose,
slotProps: {
paper: {
sx: {
borderRadius: 3,
maxWidth: 400,
mx: "auto",
overflow: "hidden"
}
}
},
children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.DialogContent, {
sx: {
p: 0
},
children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
alignItems: "center",
sx: {
pt: 4,
pb: 3,
px: 4,
textAlign: "center"
},
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
sx: {
width: 64,
height: 64,
borderRadius: "50%",
display: "flex",
alignItems: "center",
justifyContent: "center",
bgcolor: theme => (0, _styles.alpha)(theme.palette.warning.main, 0.1),
mb: 2.5
},
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_PauseCircleOutline.default, {
sx: {
fontSize: 36,
color: "warning.main"
}
})
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
sx: {
fontWeight: 700,
fontSize: 18,
mb: 1,
color: "text.primary"
},
children: t("payment.checkout.stopAcceptingOrders.title")
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
sx: {
color: "text.secondary",
fontSize: 14,
lineHeight: 1.6
},
children: t("payment.checkout.stopAcceptingOrders.description")
})]
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
sx: {
px: 4,
pb: 3
},
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Button, {
fullWidth: true,
variant: "contained",
disableElevation: true,
onClick: onClose,
sx: {
borderRadius: 2,
textTransform: "none",
fontWeight: 600,
py: 1
},
children: t("common.know")
})
})]
})
});
}