DetailPanel
packages/ui/src/components/data/DetailPanel.tsx
Import
Subpath export:
@marktiderman/genesis-ui/dataimport { DetailPanel } from "@marktiderman/genesis-ui/data";Components
Auto-generated from TypeScript source via
react-docgen-typescript.DetailPanel
| Prop | Type | Default | Description |
|---|---|---|---|
| item* | Record<string, unknown> | null | — | The record to display |
| onClose* | () => void | — | Close handler |
| open* | boolean | — | Whether panel is visible |
| children | ((item: T) => ReactNode) | — | Custom content renderer |
| fields | { key: string; label: string; render?: ((value: unknown, item: T) => ReactNode); }[] | — | Field definitions for auto-rendering |
| layout | enum | sheet | Rendering shell for the header + content below. - `"sheet"` (default): fixed, right-anchored slide-in panel, composed from the shared `Sheet` primitive. Matches this component's original (pre-`layout`-prop) behavior — existing consumers that don't pass `layout` see no change, other than an overlay now present at all breakpoints (previously mobile-only) since it's a real `Sheet`. - `"dialog"`: centered modal overlay, composed from the shared `Dialog` primitive. - `"inline"`: plain in-flow panel — no overlay, backdrop, or fixed positioning — for master-detail / split-pane layouts. |
| onDelete | ((item: T) => void) | — | Shows delete button if provided |
| onEdit | ((item: T) => void) | — | Shows edit button if provided |
| subtitle | string | — | Header subtitle |
| title | string | — | Header title |
| width | enum | md | Panel width. For `"sheet"` / `"inline"` this is a fixed pixel width (matching this component's original, pre-`layout` sizing exactly). For `"dialog"` it maps to Tailwind's modal max-width scale instead, since a centered modal has a different sizing idiom than an edge-anchored panel. |