{"version":3,"file":"Value.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAcnD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import type { TextElement } from './Text';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Value} component.\n *\n * @property value - The value shown on the right side.\n * @property extra - The extra text shown on the left side.\n * @category Component Props\n */\nexport type ValueProps = {\n  value: TextElement | string;\n  extra: TextElement | string;\n};\n\nconst TYPE = 'Value';\n\n/**\n * A value component, which can be used to display two different text values side by side.\n *\n * This component can only be used as a child of the {@link Row} component.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.value - The value shown on the right side.\n * @param props.extra - The extra text shown on the left side.\n * @returns A value element.\n * @example\n * <Value value=\"0.05 ETH\" extra=\"$200\" />\n * @example\n * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />\n * @category Components\n */\nexport const Value = createSnapComponent<ValueProps, typeof TYPE>(TYPE);\n\n/**\n * A value element.\n *\n * @see {@link Value}\n * @category Elements\n */\nexport type ValueElement = ReturnType<typeof Value>;\n"]}