Skip to content

AdminCardSection

AdminCardSection<T>(props): ReactNode

Defined in: packages/react/src/admin/AdminCardSection.tsx:54

One heading + card grid, for a registered resource list (collections, media collections, globals) — the section shape DashboardView originally hand-rolled three times verbatim; extracted here so DashboardView, GlobalsListView, and the collections-only index page (CollectionsIndexView) all render the IDENTICAL markup instead of three near-copies silently drifting apart.

Hidden via <Activity mode="hidden">, not removed from the DOM, when items is empty — display:none on the whole section (heading + grid together), same technique DashboardView already used, so a later permission grant doesn’t shift anything above or below it (zero layout shift — the empty section still occupies no visible space, but its DOM node, and therefore the page’s own structure, doesn’t change shape).

T

AdminCardSectionProps<T>

Section title, the (already-filtered) item list, and a per-item resolver.

ReactNode

The section’s heading + card grid, or nothing visible when items is empty.