feat: make button customizable in projects

This commit is contained in:
xHyroM 2023-07-15 15:08:49 +02:00
parent a00794f668
commit 851836aada
No known key found for this signature in database
GPG key ID: BE0423F386C436AA
2 changed files with 10 additions and 2 deletions

View file

@ -153,6 +153,10 @@ export const PROJECTS = [
name: "links", name: "links",
link: "https://github.com/xHyroM/links", link: "https://github.com/xHyroM/links",
desc: "Modern and simple link tree. Built on top of Astro and TailwindCSS. Using Cloudflare Pages.", desc: "Modern and simple link tree. Built on top of Astro and TailwindCSS. Using Cloudflare Pages.",
button: {
name: "Goto",
link: "https://links.xhyrom.dev",
},
}, },
{ {
name: "lsx", name: "lsx",
@ -203,6 +207,10 @@ export const PROJECTS = [
name: string; name: string;
link: string; link: string;
desc: string; desc: string;
button?: {
name: string;
link: string;
};
stats?: { stats?: {
forks: number; forks: number;
stars: number; stars: number;

View file

@ -97,8 +97,8 @@ PROJECTS.sort((a, b) => a.name.localeCompare(b.name));
iconClass="ml-2 mt-[1px] h-[23px] w-5" iconClass="ml-2 mt-[1px] h-[23px] w-5"
/> />
<Button <Button
label="Docs" label={project.button?.name ?? "Docs"}
link={project.link} link={project.button?.link ?? project.link}
type="secondary" type="secondary"
icon="/icons/book-open.svg" icon="/icons/book-open.svg"
iconClass="mr-2 h-6 w-5" iconClass="mr-2 h-6 w-5"