Fix long text in ModalTitle (#2173)

* Fix long text in ModalTitle

* Add a simple tooltip

Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
This commit is contained in:
katspaugh 2021-04-21 13:22:18 +02:00 committed by GitHub
parent 1f7d27e75e
commit 8d0b512ebf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,9 @@ import Row from 'src/components/layout/Row'
const StyledParagraph = styled(Paragraph)`
&& {
font-size: ${lg};
white-space: nowrap;
max-width: 370px;
overflow: hidden;
}
`
const IconImg = styled.img`
@ -57,7 +60,7 @@ const ModalTitle = ({ goBack, iconUrl, title, onClose }: Props): React.ReactElem
</GoBackWrapper>
)}
{iconUrl && <IconImg alt={title} src={iconUrl} />}
<StyledParagraph noMargin weight="bolder">
<StyledParagraph noMargin weight="bolder" title={title}>
{title}
</StyledParagraph>
</TitleWrapper>

View File

@ -17,6 +17,7 @@ interface Props {
weight?: string
onClick?: MouseEventHandler<HTMLParagraphElement>
style?: CSSProperties
title?: string
}
const Paragraph = (props: Props): ReactElement => {