UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

25 lines 839 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Field = void 0; const component_1 = require("../../component.cjs"); const TYPE = 'Field'; /** * A field component, which is used to create a form field. * * @param props - The props of the component. * @param props.label - The label of the field. * @param props.error - The error message of the field. * @param props.children - The input field and the submit button. * @returns A field element. * @example * <Field label="Username"> * <Input name="username" type="text" /> * <Button type="submit">Submit</Button> * </Field> * @example * <Field label="Upload file"> * <FileInput name="file" accept={['image/*']} multiple /> * </Field> */ exports.Field = (0, component_1.createSnapComponent)(TYPE); //# sourceMappingURL=Field.cjs.map