Skip to content

Commit

Permalink
fix(attachment): fix attachment view (#1265)
Browse files Browse the repository at this point in the history
close #1257
  • Loading branch information
Anu-Ujin authored and batamar committed Sep 13, 2019
1 parent c0030e3 commit 3c83b20
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/common/components/Attachment.tsx
Expand Up @@ -71,6 +71,13 @@ const Meta = styled.div`
}
`;

const AttachmentName = styled.span`
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 200px;
`;

type Props = {
attachment: IAttachment;
scrollBottom?: () => void;
Expand All @@ -84,7 +91,7 @@ class Attachment extends React.Component<Props> {
return (
<>
<h5>
{name}
<AttachmentName>{name}</AttachmentName>
<Download
rel="noopener noreferrer"
href={readFile(attachment.url)}
Expand Down

0 comments on commit 3c83b20

Please sign in to comment.