import React from 'react' import styled from 'styled-components' import { Colors, Font } from '../../../../design' import type { ParsedValue } from '../../../../providers/abi/ParsedValue' import { formatInteger } from '../../EventItem/formatInteger' import { Address } from './Address' import { Bytes } from './Bytes' import { Tuple } from './Tuple' interface Props { value: ParsedValue | undefined network: string | undefined } export function ValueItem({ value, network }: Props) { if (value === undefined) { return <No value> } else if (value.type === 'address') { return
} else if (value.type === 'number') { return {formatInteger(value.value)} } else if (value.type === 'string') { return {JSON.stringify(value.value)} } else if (value.type === 'boolean') { return {value.value ? 'true' : 'false'} } else if (value.type === 'bytes') { return } else if (value.type === 'tuple') { return } else { return } } const NoValue = styled.span` font-family: ${Font.Code}; color: ${Colors.Text2}; ` const Code = styled.span` font-family: ${Font.Code}; `