UNPKG

@blocklet/ui-react

Version:

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

29 lines (28 loc) 1.06 kB
import { jsx as o } from "react/jsx-runtime"; import a from "@arcblock/ux/lib/Center"; import { useLocaleContext as m, LocaleProvider as c } from "@arcblock/ux/lib/Locale/context"; import s from "@emotion/styled"; import { Box as r, CircularProgress as p } from "@mui/material"; import { useConfigUserSpaceContext as l } from "../../../contexts/config-user-space.js"; import f from "./connected.js"; import d from "./disconnect.js"; import { translations as h } from "../../libs/locales.js"; function P() { const { spaceGateway: t, hasStorageEndpoint: e, loading: i } = l(), { locale: n } = m(); return i ? /* @__PURE__ */ o(a, { relative: "parent", children: /* @__PURE__ */ o(p, {}) }) : /* @__PURE__ */ o(c, { translations: h, locale: n, children: /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o( r, { sx: { maxWidth: "720px" }, children: e ? /* @__PURE__ */ o(f, { spaceGateway: t }) : /* @__PURE__ */ o(d, {}) } ) }) }); } const u = s(r)` height: 100%; overflow-y: auto; `; export { P as default };