UNPKG

@blocklet/ui-react

Version:

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

18 lines (17 loc) 471 B
import { jsx as a } from "react/jsx-runtime"; import { useSessionStorageState as o } from "ahooks"; import { EMBED_MODE_KEY as m } from "./constant.js"; function p(e) { const i = e.displayName || e.name || "Component"; function t(n) { const [r] = o(m, { defaultValue: 0, listenStorageChange: !0 }); return r === 1 ? null : /* @__PURE__ */ a(e, { ...n }); } return t.displayName = `withHideWhenEmbed(${i})`, t; } export { p as default };