@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
26 lines • 1.19 kB
text/typescript
import type { CaipChainId } from "@metamask/utils";
export type AddressInputProps = {
name: string;
value?: string | undefined;
chainId: CaipChainId;
placeholder?: string | undefined;
disabled?: boolean | undefined;
displayAvatar?: boolean | undefined;
};
/**
* An input component for entering an address. Resolves the address to a display name and avatar.
*
* @param props - The props of the component.
* @param props.name - The name of the input field.
* @param props.value - The value of the input field.
* @param props.chainId - The CAIP-2 chain ID of the address.
* @param props.placeholder - The placeholder text of the input field.
* @param props.disabled - Whether the input field is disabled.
* @param props.displayAvatar - Whether to display the avatar of the address.
* @returns An input element.
* @example
* <AddressInput name="address" value="0x1234567890123456789012345678901234567890" chainId="eip155:1" />
*/
export declare const AddressInput: import("../../component.cjs").SnapComponent<AddressInputProps, "AddressInput">;
export type AddressInputElement = ReturnType<typeof AddressInput>;
//# sourceMappingURL=AddressInput.d.cts.map