(column: ColumnProps)
| 14 | }; |
| 15 | |
| 16 | function 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 | |
| 43 | export const Column = memo(ColumnElement); |
nothing calls this directly
no test coverage detected