UNPKG

@lifi/wallet-management

Version:

LI.FI Wallet Management solution.

39 lines 1.72 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { Dialog, Drawer, useMediaQuery } from '@mui/material'; const maxWidth = 460; export const WalletMenuModal = ({ open, onClose, children, }) => { const isMobile = useMediaQuery((theme) => theme.breakpoints.down(maxWidth)); return isMobile ? (_jsx(Drawer, { anchor: "bottom", open: open, onClose: onClose, PaperProps: { sx: (theme) => ({ maxHeight: '80%', background: theme.palette.background.default, borderTopLeftRadius: theme.shape.borderRadius * 2, borderTopRightRadius: theme.shape.borderRadius * 2, }), }, slotProps: { backdrop: { sx: { backgroundColor: 'rgb(0 0 0 / 24%)', backdropFilter: 'blur(3px)', }, }, }, children: children })) : (_jsx(Dialog, { open: open, onClose: onClose, scroll: "paper", PaperProps: { sx: (theme) => ({ width: '100%', maxWidth: maxWidth, background: theme.palette.background.default, borderTopLeftRadius: theme.shape.borderRadius * 2, borderTopRightRadius: theme.shape.borderRadius * 2, borderBottomLeftRadius: theme.shape.borderRadius * 2, borderBottomRightRadius: theme.shape.borderRadius * 2, }), }, slotProps: { backdrop: { sx: { backgroundColor: 'rgb(0 0 0 / 24%)', backdropFilter: 'blur(3px)', }, }, }, children: children })); }; //# sourceMappingURL=WalletMenuModal.js.map