UNPKG

@mojito-inc/secondary-market

Version:

Mojito secondary market is the platform to purchase NFT.

2 lines (1 loc) 2.39 kB
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useMemo as i}from"react";import l from"@mui/material/Stack";import t from"@mui/material/Menu";import r from"@mui/material/Modal";import a from"@mui/material/ListItem";import n from"@mui/material/List";import p from"@mui/material/Typography";import d from"@mui/material/Box";import{useTheme as c}from"@mui/material/styles";import m from"@mui/icons-material/Close";import s from"./MenuDetailsContainer.js";const u=({leftIcon:u,text:h,selectedValue:x,options:v,open:f,isMobileScreen:b,anchorEl:g,handleClickListItem:C,handleApply:k,handleMenuItemClick:y,handleClose:M})=>{var w,I,S,z,D;const L=c(),j=i((()=>{var o,e,i;return{position:"absolute",top:"100px",width:"calc(100% - 32px)",bgcolor:null===(i=null===(e=null===(o=L.palette)||void 0===o?void 0:o.appDefaultColor)||void 0===e?void 0:e.secondary)||void 0===i?void 0:i.light,overflowY:"auto",padding:"16px 16px 30px 16px"}}),[L]);return o(l,{children:[e(n,{sx:{padding:"0"},component:"nav","aria-label":"Device settings",children:o(a,{id:"lock-button","aria-haspopup":"listbox","aria-controls":"lock-menu","aria-label":"when device is locked","aria-expanded":f?"true":void 0,onClick:C,sx:{justifyContent:"center",width:"80px",cursor:"pointer",border:`1px solid ${L.palette.grey[600]}`,borderRadius:"4px",height:"40px",color:null===(I=null===(w=null==L?void 0:L.palette)||void 0===w?void 0:w.text)||void 0===I?void 0:I.secondary},children:[u," ",e(p,{sx:{fontSize:"16px"},children:h})]})}),b?e(r,{open:f,children:o(d,{sx:j,children:[e(d,{sx:{position:"fixed",height:"24px",right:"8px"},children:e(m,{sx:{cursor:"pointer",color:L.palette.background.default,fontSize:"24px"},onClick:M})}),e(s,{selectedValue:x,options:v,handleApply:k,handleMenuItemClick:y})]})}):e(t,{PaperProps:{style:{transform:"translateY(47px)",width:300,boxShadow:`0px 2px 6px 2px ${null===(S=null==L?void 0:L.palette)||void 0===S?void 0:S.boxShadowColor}`,backgroundColor:null===(D=null===(z=L.palette.appDefaultColor)||void 0===z?void 0:z.secondary)||void 0===D?void 0:D.light}},id:"lock-menu",anchorEl:g,open:f,onClose:M,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},MenuListProps:{"aria-labelledby":"lock-button",role:"listbox"},children:e(d,{children:e(s,{selectedValue:x,options:v,handleApply:k,handleMenuItemClick:y})})})]})};export{u as default};