Files
supabase/apps/design-system/registry/default/example/table-icons.tsx
Danny Whiteandcoderabbitai[bot] 0d8ec0d011 feat(design-system): improve table docs (#41215)
* docs updates

* docs expansion

* minor docs fix

* improvements

* fix dependencies

* docs expansion

* more table examples

* map over data

* improve copy

* Update apps/design-system/registry/default/example/table-row-link-actions.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/design-system/registry/default/example/table-row-link-actions.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fixes

* fix

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-11 13:38:26 +11:00

47 lines
1.2 KiB
TypeScript

import { User } from 'lucide-react'
import { Card, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from 'ui'
const users = [
{
name: 'Feathers McGraw',
email: 'feathers@example.com',
},
{
name: 'Piella Bakewell',
email: 'piella@example.com',
},
{
name: 'Wendolene Ramsbottom',
email: 'wendolene@example.com',
},
]
export default function TableIcons() {
return (
<Card className="w-full">
<Table>
<TableHeader>
<TableRow>
<TableHead className="w-1">
<span className="sr-only">Icon</span>
</TableHead>
<TableHead>Name</TableHead>
<TableHead>Email</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{users.map((user) => (
<TableRow key={user.email}>
<TableCell className="w-1">
<User size={16} className="text-foreground-muted" />
</TableCell>
<TableCell>{user.name}</TableCell>
<TableCell className="text-foreground-lighter">{user.email}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</Card>
)
}