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

Function Example

starters/docs/stories/Sheet.stories.tsx:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22type Story = StoryFn<typeof Sheet>;
23
24export const Example: Story = args => (
25 <SheetTrigger>
26 <Button>Sign up…</Button>
27 <Sheet {...args}>
28 {({close}) => (
29 <form>
30 <Heading slot="title">Sign up</Heading>
31 <TextField autoFocus label="First Name" placeholder="Enter your first name" />
32 <TextField label="Last Name" placeholder="Enter your last name" />
33 <Button onPress={close} style={{marginTop: 8}}>
34 Submit
35 </Button>
36 </form>
37 )}
38 </Sheet>
39 </SheetTrigger>
40);
41
42Example.args = {
43 position: 'bottom'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected