UNPKG

@mojito-inc/secondary-market

Version:

Mojito secondary market is the platform to purchase NFT.

2 lines (1 loc) 1.77 kB
import{jsxs as i,jsx as t}from"react/jsx-runtime";import e from"@mui/material/Stack";import o from"@mui/material/Tooltip";import r from"@mui/material/Typography";import l from"@mui/material/Box";import{useTheme as n}from"@mui/material/styles";import a from"@mui/icons-material/InfoOutlined";import{Currency as d}from"../interface/index.js";import{formatUsdAndEuroCurrency as c}from"../utils/usdAndEuroCurrencyFormat.js";const m=({ethIcon:m,wethValue:s,listPrice:p,priceUSD:u,toolTipTitle:f,isError:x=!1,fiatCurrency:v=d.USD,title:h})=>{var g,y,w,S,j,z,T,C;const D=n();return i(l,{children:[i(e,{direction:"row",sx:{justifyContent:"space-between"},children:[i(l,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t(r,{sx:{marginRight:"5px",fontSize:"14px",fontWeight:500},children:null!=h?h:"Offer Total"}),t(o,{placement:"top-start",title:f,arrow:!0,children:t(a,{style:{color:null===(y=null===(g=null==D?void 0:D.palette)||void 0===g?void 0:g.grey)||void 0===y?void 0:y[500],fontSize:"18px"}})})]}),i(l,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"6px"},children:[t("img",{src:m,width:20,height:20,alt:"eth"}),t(r,{sx:{fontSize:"20px",fontWeight:500},children:s})]})]}),i(e,{direction:"row",sx:{justifyContent:"space-between"},children:[t(r,{sx:{fontSize:"12px",color:x?null===(S=null===(w=null==D?void 0:D.palette)||void 0===w?void 0:w.toastError)||void 0===S?void 0:S[500]:null===(z=null===(j=null==D?void 0:D.palette)||void 0===j?void 0:j.toastSuccess)||void 0===z?void 0:z[500]},children:+p>0?`${p}% above list price`:""}),i(r,{sx:{fontSize:"12px",color:null===(C=null===(T=null==D?void 0:D.palette)||void 0===T?void 0:T.grey)||void 0===C?void 0:C[500]},children:["≈ ",c(null!=u?u:0,v)," ",v]})]})]})};export{m as default};