MCPcopy Create free account
hub / github.com/mantinedev/ui.mantine.dev / UsersTable

Function UsersTable

lib/UsersTable/UsersTable.tsx:62–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60};
61
62export function UsersTable() {
63 const rows = data.map((item) => (
64 <Table.Tr key={item.name}>
65 <Table.Td>
66 <Group gap="sm">
67 <Avatar size={30} src={item.avatar} radius={30} alt="" />
68 <Text fz="sm" fw={500}>
69 {item.name}
70 </Text>
71 </Group>
72 </Table.Td>
73
74 <Table.Td>
75 <Badge color={jobColors[item.job.toLowerCase()]} variant="light">
76 {item.job}
77 </Badge>
78 </Table.Td>
79 <Table.Td>
80 <Anchor component="button" size="sm">
81 {item.email}
82 </Anchor>
83 </Table.Td>
84 <Table.Td>
85 <Text fz="sm">{item.phone}</Text>
86 </Table.Td>
87 <Table.Td>
88 <Group gap={0} justify="flex-end">
89 <ActionIcon variant="subtle" color="gray" aria-label="Edit user">
90 <IconPencil size={16} stroke={1.5} />
91 </ActionIcon>
92 <ActionIcon variant="subtle" color="red" aria-label="Delete user">
93 <IconTrash size={16} stroke={1.5} />
94 </ActionIcon>
95 </Group>
96 </Table.Td>
97 </Table.Tr>
98 ));
99
100 return (
101 <Table.ScrollContainer minWidth={800}>
102 <Table verticalSpacing="sm">
103 <Table.Thead>
104 <Table.Tr>
105 <Table.Th>Employee</Table.Th>
106 <Table.Th>Job title</Table.Th>
107 <Table.Th>Email</Table.Th>
108 <Table.Th>Phone</Table.Th>
109 <Table.Th>
110 <VisuallyHidden>Actions</VisuallyHidden>
111 </Table.Th>
112 </Table.Tr>
113 </Table.Thead>
114 <Table.Tbody>{rows}</Table.Tbody>
115 </Table>
116 </Table.ScrollContainer>
117 );
118}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected