mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-04 05:43:57 +00:00
Fix TX detail visualization (#1281)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
This commit is contained in:
parent
5333534f97
commit
5573383c48
@ -36,9 +36,7 @@ const TxDetailsMethodName = styled(Text)`
|
||||
`
|
||||
const TxDetailsMethodParam = styled.div`
|
||||
text-indent: 8px;
|
||||
`
|
||||
const InlineText = styled(Text)`
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
`
|
||||
const TxDetailsContent = styled.div`
|
||||
padding: 8px 8px 8px 16px;
|
||||
@ -56,9 +54,9 @@ const TxInfoDetails = ({ data }: { data: DataDecoded }): React.ReactElement => (
|
||||
|
||||
{data.parameters.map((param, index) => (
|
||||
<TxDetailsMethodParam key={`${data.method}_param-${index}`}>
|
||||
<InlineText size="lg" strong>
|
||||
<Text size="lg" strong>
|
||||
{param.name}({param.type}):
|
||||
</InlineText>
|
||||
</Text>
|
||||
<Value method={data.method} type={param.type} value={param.value} />
|
||||
</TxDetailsMethodParam>
|
||||
))}
|
||||
|
@ -14,14 +14,14 @@ import SafeEtherscanLink from 'src/components/EtherscanLink'
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
||||
const InlineText = styled(Text)`
|
||||
display: inline-flex;
|
||||
`
|
||||
|
||||
const NestedWrapper = styled.div`
|
||||
text-indent: 24px;
|
||||
`
|
||||
|
||||
const StyledText = styled(Text)`
|
||||
white-space: normal;
|
||||
`
|
||||
|
||||
interface RenderValueProps {
|
||||
method: string
|
||||
type: string
|
||||
@ -61,15 +61,15 @@ const GenericValue = ({ method, type, value }: RenderValueProps): React.ReactEle
|
||||
return (
|
||||
<NestedWrapper>
|
||||
{(value as string[]).map((value, index) => (
|
||||
<Text key={`${method}-value-${index}`} size="lg">
|
||||
<StyledText key={`${method}-value-${index}`} size="lg">
|
||||
{value}
|
||||
</Text>
|
||||
</StyledText>
|
||||
))}
|
||||
</NestedWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
return <InlineText size="lg">{value as string}</InlineText>
|
||||
return <StyledText size="lg">{value as string}</StyledText>
|
||||
}
|
||||
|
||||
const Value = ({ type, ...props }: RenderValueProps): React.ReactElement => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user