@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
24 lines • 787 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Form = void 0;
const component_1 = require("../../component.cjs");
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>
*/
exports.Form = (0, component_1.createSnapComponent)(TYPE);
//# sourceMappingURL=Form.cjs.map