MCPcopy Create free account
hub / github.com/adobe/react-spectrum / PokemonTableView

Function PokemonTableView

packages/dev/s2-docs/pages/s2/PokemonTableView.tsx:39–64  ·  view source on GitHub ↗
(props: PokemonTableViewProps)

Source from the content-addressed store, hash-verified

37}
38
39export function PokemonTableView(props: PokemonTableViewProps) {
40 let {items = defaultItems, dragAndDropHooks} = props;
41
42 return (
43 <TableView
44 styles={style({height: 250, width: 250})}
45 aria-label="Pokemon table"
46 selectionMode="multiple"
47 dragAndDropHooks={dragAndDropHooks}>
48 <TableHeader>
49 <Column isRowHeader>Name</Column>
50 <Column>Type</Column>
51 <Column>Level</Column>
52 </TableHeader>
53 <TableBody items={items} renderEmptyState={renderEmptyState}>
54 {item => (
55 <Row>
56 <Cell>{item.name}</Cell>
57 <Cell>{item.type}</Cell>
58 <Cell>{item.level}</Cell>
59 </Row>
60 )}
61 </TableBody>
62 </TableView>
63 );
64}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected