UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

22 lines 733 B
import { createSnapComponent } from "../../component.mjs"; 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> */ export const Field = createSnapComponent(TYPE); //# sourceMappingURL=Field.mjs.map