Merge pull request #1072 from gnosis/issue-1053

Fix: Sapp confirmTXs modal width.
This commit is contained in:
Mikhail Mikheev 2020-06-29 16:24:26 +04:00 committed by GitHub
commit 5c2fec4307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -9,8 +9,13 @@ const Box = styled.p`
border: solid 2px ${border};
`
const TextBox = ({ children }: any) => {
return <Box>{children}</Box>
type Props = {
children: React.ReactNode
className?: string
}
const TextBox = ({ children, ...rest }: Props): React.ReactElement => {
return <Box {...rest}>{children}</Box>
}
export default TextBox

View File

@ -54,6 +54,10 @@ const IconText = styled.div`
margin-right: 4px;
}
`
const StyledTextBox = styled(TextBox)`
max-width: 444px;
`
const isTxValid = (t: SafeAppTx): boolean => {
if (!['string', 'number'].includes(typeof t.value)) {
return false
@ -111,7 +115,7 @@ const confirmTransactions = (
</div>
<div className="section">
<Heading tag="h3">Data (hex encoded)*</Heading>
<TextBox>{tx.data}</TextBox>
<StyledTextBox>{tx.data}</StyledTextBox>
</div>
</CollapseContent>
</Collapse>