improve attachment download card

This commit is contained in:
hippoz 2023-08-09 23:33:19 +03:00
parent aa2085050a
commit a884c02f29
Signed by: hippoz
GPG key ID: 56C4E02A85F2FBED

View file

@ -48,7 +48,10 @@
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
padding: var(--space-norm);
padding-top: var(--space-sm);
padding-bottom: var(--space-sm);
border-radius: 9999px;
background-color: var(--background-color-0);
}
@ -68,13 +71,20 @@
}
.attachment-filename {
color: var(--foreground-color-3);
margin-right: 6px;
color: var(--foreground-color-2);
margin-right: var(--space-md);
}
.attachment-card .icon-button {
margin-left: auto;
}
.attachment-card .download {
background: var(--purple-1);
border-radius: 9999px;
padding: var(--space-xs);
color: var(--foreground-color-1);
}
</style>
@ -86,7 +96,7 @@
{:else if renderAs === AttachmentRenderAs.DownloadableFile}
<div class="attachment attachment-card">
<div class="attachment-filename">{ attachment.file_name }</div>
<a class="icon-button material-icons-outlined" href="{ attachmentUrl(attachment.file) }" target="_blank">download</a>
<a class="icon-button material-icons-outlined download" href="{ attachmentUrl(attachment.file) }" target="_blank">download</a>
</div>
{:else}
<div class="attachment attachment-card">Couldn't render attachment</div>