import type { Theme } from '@mui/material' import { Dialog, Drawer, useMediaQuery } from '@mui/material' import type { PropsWithChildren } from 'react' interface WalletMenuProps { open: boolean onClose: () => void } const maxWidth = 480 export const WalletMenuModal: React.FC> = ({ open, onClose, children, }) => { const isMobile = useMediaQuery((theme: Theme) => theme.breakpoints.down(maxWidth) ) return isMobile ? ( ({ 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} ) : ( ({ 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} ) }