UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

31 lines 890 B
import { createSnapComponent } from "../component.mjs"; const TYPE = 'Text'; /** * A text component, which is used to display text. * * @param props - The props of the component. * @param props.alignment - The alignment of the text. * @param props.color - The color of the text. * @param props.children - The text to display. * @param props.size - The size of the text. Defaults to `md`. * @param props.fontWeight - The font weight of the text. Defaults to `regular`. * @returns A text element. * @example * <Text> * Hello <Bold>world</Bold>! * </Text> * @example * <Text alignment="end"> * Hello <Bold>world</Bold>! * </Text> * @example * <Text size="sm"> * Hello <Bold>world</Bold>! * </Text> * @example * <Text fontWeight="medium"> * Hello <Bold>world</Bold>! * </Text> */ export const Text = createSnapComponent(TYPE); //# sourceMappingURL=Text.mjs.map