feat(website): improve download button with icon and platform title

This commit is contained in:
Elian Doran
2025-09-27 12:41:33 +03:00
parent 65dae511e5
commit 7a73af0299
6 changed files with 22 additions and 14 deletions

View File

@@ -1,17 +1,24 @@
import { getRecommendedDownload } from "../download-helper";
import "./DownloadButton.css";
import Button from "./Button";
import downloadIcon from "../assets/boxicons/bx-arrow-in-down-square-half.svg?raw";
interface DownloadButtonProps {
big?: boolean;
}
const { architecture, platform, url } = getRecommendedDownload();
const { name, url } = getRecommendedDownload();
export default function DownloadButton({ big }: DownloadButtonProps) {
return (
<a className={`download-button ${big ? "big" : ""}`} href={url}>
Download now{" "}
<span class="platform">{platform} {architecture}</span>
</a>
<Button
className={`download-button ${big ? "big" : ""}`}
href={url}
iconSvg={downloadIcon}
text={<>
Download now{" "}
<span class="platform">for {name}</span>
</>}
/>
)
}