Skip to content

Build your personal knowledge base with Trilium Notes

refactor(website): use button component in downloads

Elian Doranadf29b4e6e01
diff --git a/apps/website/src/pages/Download/download.css b/apps/website/src/pages/Download/download.css
index 7a4f4efa43..cc726d7f7c 100644
--- a/apps/website/src/pages/Download/download.css
+++ b/apps/website/src/pages/Download/download.css
@@ -14,12 +14,9 @@
.download-options a.recommended {
display: block;
background: var(--accent-color);
- padding: 0.5em 1em;
- border-radius: calc(infinity * 1px);
color: var(--brand-foreground-color);
+ border-radius: calc(infinity * 1px);
margin: 1em 0;
- text-decoration: none;
- text-align: center;
}
.download-options .other-options {
diff --git a/apps/website/src/pages/Download/download.tsx b/apps/website/src/pages/Download/download.tsx
index e340e2f282..62acc11cf5 100644
--- a/apps/website/src/pages/Download/download.tsx
+++ b/apps/website/src/pages/Download/download.tsx
@@ -4,6 +4,7 @@ import Section from "../../components/Section";
import { App, Architecture, buildDownloadUrl, downloadMatrix, DownloadMatrixEntry, getArchitecture, Platform } from "../../download-helper";
import "./download.css";
import { usePageTitle } from "../../hooks";
+import Button, { Link } from "../../components/Button";
export default function DownloadPage() {
const [ currentArch, setCurrentArch ] = useState(getArchitecture());
@@ -54,11 +55,19 @@ export function DownloadCard({ app, arch, entry: [ platform, entry ] }: { app: A
{unwrapText(entry.description)}
<div class="download-options">
- <a className="recommended" href={buildDownloadUrl(app, platform as Platform, recommendedDownload[0], arch)}>{recommendedDownload[1].name}</a>
+ <Button
+ className="recommended"
+ href={buildDownloadUrl(app, platform as Platform, recommendedDownload[0], arch)}
+ text={recommendedDownload[1].name}
+ />
<div class="other-options">
{restDownloads.map(download => (
- <a href={buildDownloadUrl(app, platform as Platform, download[0], arch)}>{download[1].name}</a>
+ <Link
+ href={buildDownloadUrl(app, platform as Platform, download[0], arch)}
+ >
+ {download[1].name}
+ </Link>
))}
</div>
</div>