import { useState } from "react"; import { Eye } from "lucide-react"; import Button from "../src/components/Button"; import Card from "../src/components/Card"; import ConnectionTree from "../src/components/ConnectionTree"; import ContentSection from "../src/components/ContentSection"; import LoadingFrame from "../src/components/LoadingFrame"; import DataGrid, { type DataGridColumn } from "../src/components/table/DataGrid"; import TableActionGroup from "../src/components/table/TableActionGroup"; type Row = { id: string; name: string; detail: string }; const rows: Row[] = ["Alpha", "Beta", "Gamma"].map((name) => ({ id: name, name, detail: "A long configured value ".repeat(12) })); /** The real shared surfaces, without module-local inset or width overrides. */ export default function CardTableLayoutScenario() { const [loading, setLoading] = useState(false); const [inspected, setInspected] = useState(""); const columns: DataGridColumn[] = [ { id: "name", header: "Name", minWidth: 160, value: (row) => row.name }, { id: "detail", header: "Details", minWidth: 220, value: (row) => row.detail }, { id: "actions", header: "Actions", columnType: "actions", sticky: "end", render: (row) => , onClick: () => setInspected(row.name) } ]} /> } ]; const grid = (id: string) => row.id} />; const tree = () => row.name }]} getRowKey={(row) => row.id} />; return
{inspected} {grid("direct")} {grid("collapsible")} {grid("loading")}
{grid("admin")}
{grid("loading-admin")}
{tree()} {tree()} {grid("explicit")} Meaningful table context {grid("context")}

Ordinary content keeps its inset.

{grid("mixed")}

Ordinary content keeps its inset.

{grid("loading-mixed")}
{grid("standalone")}
; }