Skip to content

Commit b5839f4

Browse files
authored
Update Button examples for Snaps (#1801)
1 parent 594a8ff commit b5839f4

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

snaps/assets/custom-ui-button.png

-21.1 KB
Loading

snaps/assets/custom-ui-form.png

-21.5 KB
Loading

snaps/features/custom-ui/index.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -589,18 +589,22 @@ Outputs a form for use in [interactive UI](interactive-ui.md).
589589
#### Example
590590
591591
```js
592-
import { Form, Input, Button } from "@metamask/snaps-sdk/jsx";
592+
import { Box, Section, Form, Input, Button } from "@metamask/snaps-sdk/jsx";
593593

594594
const interfaceId = await snap.request({
595595
method: "snap_createInterface",
596596
params: {
597597
ui: (
598-
<Form name="form-to-fill">
599-
<Field label="First Name">
600-
<Input name="firstName" placeholder="Enter your first name" />
601-
</Field>
602-
<Button type="submit">Submit</Button>
603-
</Form>
598+
<Box>
599+
<Section>
600+
<Form name="form-to-fill">
601+
<Field label="First Name">
602+
<Input name="firstName" placeholder="Enter your first name" />
603+
</Field>
604+
<Button type="submit">Submit</Button>
605+
</Form>
606+
</Section>
607+
</Box>
604608
),
605609
},
606610
});

0 commit comments

Comments
 (0)