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

Function Example

starters/hooks/stories/GridList.stories.tsx:16–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14type Story = StoryFn<typeof GridList>;
15
16export const Example: Story = args => (
17 <GridList aria-label="Pokémon" selectionMode="multiple" selectionBehavior="replace" {...args}>
18 <GridListItem id="charizard" textValue="Charizard">
19 Charizard
20 <Button variant="secondary" onPress={() => alert('Info for Charizard')}>
21 Info
22 </Button>
23 </GridListItem>
24 <GridListItem id="blastoise" textValue="Blastoise">
25 Blastoise
26 <Button variant="secondary" onPress={() => alert('Info for Blastoise')}>
27 Info
28 </Button>
29 </GridListItem>
30 <GridListItem id="venusaur" textValue="Venusaur">
31 Venusaur
32 <Button variant="secondary" onPress={() => alert('Info for Venusaur')}>
33 Info
34 </Button>
35 </GridListItem>
36 </GridList>
37);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected