Active Foundation · Example
Names and types in a table
Names and types in a tableClient
| Prop | Type |
|---|---|
open | boolean |
children | Payload |
on | ((open: boolean) => void) | undefined |
Full source examples/ui/code.tsx
// apps/docs/examples/ui/code.tsximport {Code} from '@workspace/active-ui/components/composed/code';import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow,} from '@workspace/active-ui/components/primitives/table';
/** * Inline code outside running text, in a table. A long name moves to the * next line as a whole and breaks only at its readable points when the * column is narrower than the name; `…` keeps its closing brackets. Copying * a name gives it exactly. Narrow the window to see the breaks. */export default function CodeExample() { return ( <Table className="w-full max-w-xl"> <TableHeader> <TableRow> <TableHead>Prop</TableHead> <TableHead>Type</TableHead> </TableRow> </TableHeader> <TableBody> <TableRow> <TableCell> <Code>open</Code> </TableCell> <TableCell> <Code>boolean</Code> </TableCell> </TableRow> <TableRow> <TableCell> <Code>children</Code> </TableCell> <TableCell> <Code>PayloadChildRenderFunction<…></Code> </TableCell> </TableRow> <TableRow> <TableCell> <Code>onOpenChangeComplete</Code> </TableCell> <TableCell> <Code>((open: boolean) => void) | undefined</Code> </TableCell> </TableRow> </TableBody> </Table> );}