@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
20 lines • 753 B
JavaScript
import { createSnapComponent } from "../component.mjs";
const TYPE = 'Value';
/**
* 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 const Value = createSnapComponent(TYPE);
//# sourceMappingURL=Value.mjs.map