Skip to content

Commit

Permalink
feat(editor): display size in file summary
Browse files Browse the repository at this point in the history
  • Loading branch information
sabberworm committed Oct 28, 2024
1 parent 0fe14ca commit b888a0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/frontend/sections/output/FileMessageOutput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Elm = styled('div')`
border-radius: 12px;
display: grid;
gap: 6px;
grid-template-areas: 'icon name . download' 'icon type . download';
grid-template-areas: 'icon name name download' 'icon type size download';
grid-template-columns: max-content max-content 1fr max-content;
> coral-icon {
grid-area: icon;
Expand All @@ -28,6 +28,9 @@ const Elm = styled('div')`
> .type {
grid-area: type;
}
> .size {
grid-area: size;
}
> a {
grid-area: download;
}
Expand Down Expand Up @@ -77,6 +80,7 @@ export const FileMessageOutput: FC<{ message: FileMessage }> = ({ message }) =>
<coral-icon icon={icon} size="L" />
<span className="name">{message.name}</span>
<small className="type">{message.mime}</small>
<small className="size">{message.blob?.size} bytes</small>
<a href={URL.createObjectURL(message.blob!)} download={message.name}>
<button type="button" is="coral-button" icon="download">
Download
Expand Down

0 comments on commit b888a0f

Please sign in to comment.