UNPKG

@blocklet/ui-react

Version:

Some useful front-end web components that can be used in Blocklets.

61 lines (56 loc) 1.22 kB
import { jsx as t } from "react/jsx-runtime"; import { Modal as n } from "@mui/material"; import r from "@emotion/styled"; import a, { getNFTData as s } from "@arcblock/ux/lib/NFTDisplay"; function f({ visible: e, onClose: o, nft: i }) { return !e || !i ? null : /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(n, { open: e, onClose: o, children: /* @__PURE__ */ t(h, { onClick: o, children: /* @__PURE__ */ t(a, { data: s(i), address: i.address, inset: !0 }) }) }) }); } const d = r.div` position: relative; width: 100%; height: 100%; cursor: pointer; &:hover { .mask { opacity: 1; } } .mask { position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.2s; } `, h = r.div` display: flex; justify-content: center; align-items: center; height: 100vh; width: 100vw; img, object { max-width: 90vw; max-height: 75vh; } .nft-display--inset { > .MuiBox-root, .nft-display__loading { width: 75vmin; height: 75vmin; } } `; export { f as default };