Ir al contenido

TableBody

Esta página aún no está disponible en tu idioma.

import { TableBody } from "@rebasepro/ui";
Prop Type Required Description
children React.ReactNode
className string
id string
style React.CSSProperties

This is the example the design-system sync renders and verifies for this component.

export function PopulatedBody() {
return (
<div className="overflow-x-auto w-full">
<Table className="w-full">
<TableHeader>
<TableCell header className="w-16"></TableCell>
<TableCell header>Email</TableCell>
<TableCell header>Name</TableCell>
<TableCell header>Roles</TableCell>
</TableHeader>
<TableBody>
{USERS.map(user => (
<TableRow key={user.uid}>
<TableCell style={{ width: "64px" }}>
<Tooltip asChild title="Delete this user">
<IconButton size="small"><Trash2Icon/></IconButton>
</Tooltip>
</TableCell>
<TableCell>{user.email}</TableCell>
<TableCell className="font-medium">{user.displayName}</TableCell>
<TableCell>
<div className="flex flex-wrap gap-2">
{user.roles.map(role => (
<Chip key={role.id} colorScheme={role.isAdmin ? "purple" : "blue"} size="small">
{role.name}
</Chip>
))}
</div>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div>
);
}