@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
20 lines • 836 B
JavaScript
import { createSnapComponent } from "../component.mjs";
const TYPE = 'Image';
/**
* An image component, which is used to display an image.
*
* This component does not accept any children.
*
* @param props - The props of the component.
* @param props.src - The URL of the image to display. This should be an SVG
* string, and other formats such as PNG and JPEG are not supported directly.
* You can use the `data:` URL scheme to embed images inside the SVG.
* @param props.alt - The alternative text of the image, which describes the
* image for users who cannot see it.
* @param props.borderRadius - The border radius applied to the image.
* @returns An image element.
* @example
* <Image src="<svg>...</svg>" alt="An example image" />
*/
export const Image = createSnapComponent(TYPE);
//# sourceMappingURL=Image.mjs.map