Skip to content

Commit c3a8edc

Browse files
committed
Fix download button markup to make the left side rounded
1 parent feb58a5 commit c3a8edc

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

frontend/src/components/DownloadLink.tsx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,32 @@ export function DownloadLink({
2121
filesize: number | undefined;
2222
}) {
2323
return (
24-
<div className="join">
25-
<div className="join-item flex items-center justify-center mr-2 font-bold text-base-content/60">
24+
<div className="flex items-center">
25+
<div className="mr-2 font-bold text-base-content/60">
2626
{label}
2727
</div>
28-
<a href={url} download>
28+
29+
<div className="join">
30+
<a href={url} download>
31+
<button
32+
type="button"
33+
className={`btn btn-sm join-item ${
34+
filesize ? "tooltip tooltip-top" : ""
35+
}`}
36+
{...(filesize && { "data-tip": humanizeSize(filesize) })}
37+
>
38+
<HardDriveDownload size={16} />
39+
</button>
40+
</a>
2941
<button
3042
type="button"
31-
className={`btn btn-sm join-item ${filesize ? "tooltip tooltip-top" : ""}`}
32-
{...(filesize && { "data-tip": humanizeSize(filesize) })}
43+
className="btn btn-sm join-item tooltip tooltip-top"
44+
data-tip="Copy link"
45+
onClick={() => navigator.clipboard.writeText(url)}
3346
>
34-
<HardDriveDownload size={16} />
47+
<Link size={16} />
3548
</button>
36-
</a>
37-
<button
38-
type="button"
39-
className="btn btn-sm join-item tooltip tooltip-top"
40-
data-tip="Copy link"
41-
onClick={() => navigator.clipboard.writeText(url)}
42-
>
43-
<Link size={16} />
44-
</button>
49+
</div>
4550
</div>
4651
);
4752
}

0 commit comments

Comments
 (0)