MCPcopy Index your code
hub / github.com/tinyplex/tinybase / Header

Function Header

src/ui-solid-inspector/index.tsx:1013–1034  ·  view source on GitHub ↗
(props: StoreProp)

Source from the content-addressed store, hash-verified

1011};
1012
1013const Header = (props: StoreProp) => {
1014 const position = useValue(POSITION_VALUE, props.s);
1015 const handleClick = () => open('https://tinybase.org', '_blank');
1016 const handleClose = () => props.s.setValue(OPEN_VALUE, false);
1017 const handleDock = (event: MouseEvent & {currentTarget: HTMLImageElement}) =>
1018 props.s.setValue(POSITION_VALUE, number(event.currentTarget.dataset.id));
1019
1020 return (
1021 <header>
1022 <img class="flat" title={TITLE} onClick={handleClick} />
1023 <span>{TITLE}</span>
1024 {arrayMap(POSITIONS, (name, p) =>
1025 p == (position() ?? 1) ? (
1026 EMPTY_STRING
1027 ) : (
1028 <img onClick={handleDock} data-id={p} title={'Dock to ' + name} />
1029 ),
1030 )}
1031 <img class="flat" onClick={handleClose} title="Close" />
1032 </header>
1033 );
1034};
1035
1036const Nub = (props: StoreProp) => {
1037 const position = useValue(POSITION_VALUE, props.s);

Callers

nothing calls this directly

Calls 2

useValueFunction · 0.90
arrayMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…