@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
35 lines • 1.13 kB
text/typescript
import type { TextElement } from "./Text.mjs";
/**
* The props of the {@link Value} component.
*
* @property value - The value shown on the right side.
* @property extra - The extra text shown on the left side.
*/
export type ValueProps = {
value: TextElement | string;
extra: TextElement | string;
};
/**
* A value component, which can be used to display two different text values side by side.
*
* This component can only be used as a child of the {@link Row} component.
*
* This component does not accept any children.
*
* @param props - The props of the component.
* @param props.value - The value shown on the right side.
* @param props.extra - The extra text shown on the left side.
* @returns A value element.
* @example
* <Value value="0.05 ETH" extra="$200" />
* @example
* <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />
*/
export declare const Value: import("../component.mjs").SnapComponent<ValueProps, "Value">;
/**
* A value element.
*
* @see Value
*/
export type ValueElement = ReturnType<typeof Value>;
//# sourceMappingURL=Value.d.mts.map