@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
21 lines • 682 B
JavaScript
import { createSnapComponent } from "../../component.mjs";
const TYPE = 'Form';
/**
* A form component, which is used to create a form.
*
* @param props - The props of the component.
* @param props.children - The form fields. This should be a single field or an
* array of fields.
* @param props.name - The name of the form. This is used to identify the form
* in the event handler.
* @returns A form element.
* @example
* <Form name="my-form">
* <Field label="Username">
* <Input name="username" type="text" />
* </Field>
* <Button type="submit">Submit</Button>
* </Form>
*/
export const Form = createSnapComponent(TYPE);
//# sourceMappingURL=Form.mjs.map