@blocklet/ui-react
Version:
Some useful front-end web components that can be used in Blocklets.
17 lines (16 loc) • 760 B
JavaScript
import { jsxs as a, jsx as e } from "react/jsx-runtime";
import { useCreation as p } from "ahooks";
import { Typography as i } from "@mui/material";
import { isEthereumDid as m } from "@arcblock/ux/lib/Util";
import n from "@arcblock/ux/lib/Address";
import { BadgeContainer as d } from "./app-badge-default.js";
function b({ value: r = "", loading: o = !1, ...s }) {
const t = p(() => `DID:${m(r) ? "ETH" : "ABT"}`, [r]);
return /* @__PURE__ */ a(d, { loading: o, ...s, children: [
/* @__PURE__ */ e(i, { className: "app-badge-label", children: t }),
/* @__PURE__ */ e(i, { className: "app-badge-value", children: /* @__PURE__ */ e(n, { inline: !0, size: 14, compact: !0, responsive: !1, children: r }) })
] });
}
export {
b as AppBadgeDID
};