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

Function Example

starters/tailwind/stories/Sheet.stories.tsx:26–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24type Story = StoryFn<typeof Sheet>;
25
26export const Example: Story = args => (
27 <SheetTrigger>
28 <Button>Sign up…</Button>
29 <Sheet {...args}>
30 {({close}) => (
31 <form className="flex flex-col gap-4">
32 <Heading slot="title" className="text-xl font-semibold leading-6 my-0">
33 Sign up
34 </Heading>
35 <TextField autoFocus label="First Name" placeholder="Enter your first name" />
36 <TextField label="Last Name" placeholder="Enter your last name" />
37 <Button onPress={close} className="self-start">
38 Submit
39 </Button>
40 </form>
41 )}
42 </Sheet>
43 </SheetTrigger>
44);
45
46Example.args = {
47 position: 'bottom'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected