import { For, Show, onCleanup, type Component } from "solid-js"; import { EmptyInline } from "@/components/ui/empty-inline"; import { IconChevronRight } from "@/components/ui/icons"; import type { IllustrationName } from "@/lib/illustrations"; export type QuickLinkRow = { id: string; primary: string; secondary?: string; Icon: Component<{ class?: string }>; }; export type QuickLinkColumnProps = { title: string; rows: QuickLinkRow[]; empty: string; illustration?: IllustrationName; onVisible?: () => void; onOpen: (row: QuickLinkRow) => void; }; /** Figma "Resource Columns" from ADM-01: a subtle column header and a short * list of resource rows with a trailing caption, each navigating to the * resource's real detail page. */ export function QuickLinkColumn(props: QuickLinkColumnProps) { const observe = (el: HTMLDivElement) => { if (!props.onVisible) return; if (typeof IntersectionObserver === "undefined") { props.onVisible(); return; } const observer = new IntersectionObserver((entries) => { if (entries.some((entry) => entry.isIntersecting)) { observer.disconnect(); props.onVisible?.(); } }, { rootMargin: "160px" }); observer.observe(el); onCleanup(() => observer.disconnect()); }; return (

{props.title}

0} fallback={}> {(row) => ( )}
); }