UNPKG

@lifi/wallet-management

Version:

LI.FI Wallet Management solution.

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