UNPKG

@mojito-inc/secondary-market

Version:

Mojito secondary market is the platform to purchase NFT.

2 lines (1 loc) 1.93 kB
import{jsxs as i,jsx as l}from"react/jsx-runtime";import e from"@mui/material/Stack";import o from"@mui/material/MenuItem";import t from"@mui/material/Button";import n from"@mui/material/ListItemText";import d from"@mui/material/Box";import{useTheme as p}from"@mui/material/styles";import r from"@mui/icons-material/CheckRounded";import a from"@mui/material/Typography";const m=({selectedValue:m,options:u,isMobileScreen:x,handleApply:v,handleMenuItemClick:c})=>{var s,h,f,g,y;const b=p();return i(d,{children:[l(n,{sx:{fontFamily:null===(s=null==b?void 0:b.typography)||void 0===s?void 0:s.fontFamily,fontWeight:500,gap:"16px",marginLeft:x?"0px":"16px",padding:x?"16px 16px 0 0":null},children:l(a,{sx:{fontWeight:"500",fontSize:"16px"},children:"Sort Items"})}),u.map(((t,n)=>{var p,a;return l(d,{sx:x?{paddingTop:0===n?"8px":"0px"}:{padding:0===n?"8px 16px 0px 16px":"0px 16px"},children:l(o,{"data-testid":`menuitem_id_${null==t?void 0:t.value}`,sx:{padding:"6px 10px",fontWeight:400,background:(null==t?void 0:t.label)===(null==m?void 0:m.label)?null===(a=null===(p=null==b?void 0:b.palette)||void 0===p?void 0:p.grey)||void 0===a?void 0:a[700]:"none"},onClick:()=>c(t),children:i(e,{flexDirection:"row",sx:{width:"100%",alignItems:"center"},children:[l(e,{sx:{width:"95%"},children:null==t?void 0:t.label}),(null==t?void 0:t.label)===(null==m?void 0:m.label)&&l(e,{justifyContent:"end",children:l(r,{sx:{fontSize:"18px"}})})]})},null==t?void 0:t.label)},null==t?void 0:t.label)})),l(d,{padding:x?"24px 0px":"24px 16px 8px",children:l(t,{"data-testid":"sortApply-id",onClick:v,title:"Apply",name:"Apply",sx:{background:null===(f=null===(h=null==b?void 0:b.palette)||void 0===h?void 0:h.background)||void 0===f?void 0:f.paper,color:null===(y=null===(g=null==b?void 0:b.palette)||void 0===g?void 0:g.text)||void 0===y?void 0:y.primary,height:"40px",width:"100%",marginTop:"-10px"},children:"Apply"})})]})};export{m as default};