UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

39 lines 1.35 kB
import type { AddressElement } from "./Address.mjs"; import type { StandardFormattingElement } from "./formatting/index.mjs"; import { type IconElement } from "./Icon.mjs"; import { type ImageElement } from "./Image.mjs"; import type { SnapsChildren } from "../component.mjs"; /** * The children of the {@link Link} component. */ export type LinkChildren = SnapsChildren<string | StandardFormattingElement | IconElement | ImageElement | AddressElement>; /** * The props of the {@link Link} component. * * @property children - The text to display in the link. * @property href - The URL to link to. This must be an `https` or `mailto` URL. * `http` is not allowed. */ export type LinkProps = { children: LinkChildren; href: string; }; /** * A link component, which is used to display a hyperlink. * * @param props - The props of the component. * @param props.children - The text to display in the link. * @param props.href - The URL to link to. This must be an `https` or `mailto` * URL. `http` is not allowed. * @returns A link element. * @example * <Link href="https://example.com">Click here</Link> */ export declare const Link: import("../component.mjs").SnapComponent<LinkProps, "Link">; /** * A link element. * * @see Link */ export type LinkElement = ReturnType<typeof Link>; //# sourceMappingURL=Link.d.mts.map