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