@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
34 lines • 995 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Text = void 0;
const component_1 = require("../component.cjs");
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>
*/
exports.Text = (0, component_1.createSnapComponent)(TYPE);
//# sourceMappingURL=Text.cjs.map