MCPcopy Create free account
hub / github.com/tinyplex/tinybase / Header

Function Header

docs/pseudo.esm.sh/tinybase@9.0.0/ui-react-inspector/index.js:4747–4784  ·  view source on GitHub ↗
({ s })

Source from the content-addressed store, hash-verified

4745 }
4746};
4747var Header = ({ s }) => {
4748 const position = useValue(POSITION_VALUE, s) ?? 1;
4749 const handleClick = () => open("https://tinybase.org", "_blank");
4750 const handleClose = useSetValueCallback(OPEN_VALUE, () => false, [], s);
4751 const handleDock = useSetValueCallback(
4752 POSITION_VALUE,
4753 (event) => number(event[CURRENT_TARGET].dataset.id),
4754 [],
4755 s
4756 );
4757 return /* @__PURE__ */ jsxs("header", {
4758 children: [
4759 /* @__PURE__ */ jsx2("img", {
4760 className: "flat",
4761 title: TITLE,
4762 onClick: handleClick
4763 }),
4764 /* @__PURE__ */ jsx2("span", { children: TITLE }),
4765 arrayMap2(
4766 POSITIONS,
4767 (name, p) => p == position ? null : /* @__PURE__ */ jsx2(
4768 "img",
4769 {
4770 onClick: handleDock,
4771 "data-id": p,
4772 title: "Dock to " + name
4773 },
4774 p
4775 )
4776 ),
4777 /* @__PURE__ */ jsx2("img", {
4778 className: "flat",
4779 onClick: handleClose,
4780 title: "Close"
4781 })
4782 ]
4783 });
4784};
4785var Panel = ({ s }) => {
4786 const position = useValue(POSITION_VALUE, s) ?? 1;
4787 return useValue(OPEN_VALUE, s) ? /* @__PURE__ */ jsxs("main", {

Callers

nothing calls this directly

Calls 4

numberFunction · 0.85
useValueFunction · 0.70
useSetValueCallbackFunction · 0.70
arrayMap2Function · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…