MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / ColumnElement

Function ColumnElement

app/components/Column.tsx:16–41  ·  view source on GitHub ↗
(column: ColumnProps)

Source from the content-addressed store, hash-verified

14};
15
16function ColumnElement(column: ColumnProps) {
17 const { id, title, children } = column;
18 const [json] = useJson();
19 const { minimal } = useJsonDoc();
20 const iconColor = useMemo(() => colorForItemAtPath(id, json), [id, json]);
21
22 return (
23 <div
24 className={
25 "column flex-none border-r-[1px] border-slate-300 w-80 transition dark:border-slate-600"
26 }
27 >
28 <div className="flex items-center text-slate-800 bg-slate-50 mb-[3px] p-2 pb-0 transition dark:bg-slate-900 dark:text-slate-300">
29 {column.icon && <column.icon className="h-6 w-6 mr-1" />}
30 <Title className="text-ellipsis overflow-hidden">{title}</Title>
31 </div>
32 <div
33 className={`overflow-y-auto ${
34 minimal ? "h-viewerHeightMinimal" : "h-viewerHeight"
35 } no-scrollbar`}
36 >
37 {children}
38 </div>
39 </div>
40 );
41}
42
43export const Column = memo(ColumnElement);

Callers

nothing calls this directly

Calls 3

useJsonFunction · 0.90
useJsonDocFunction · 0.90
colorForItemAtPathFunction · 0.90

Tested by

no test coverage detected