From 520ef0cb44a585ada1acb8692292e4a88a4329bc Mon Sep 17 00:00:00 2001 From: rustmailer Date: Sun, 9 Nov 2025 01:44:39 +0800 Subject: [PATCH] feat(ui): add GithubLinkButton component --- web/src/components/layout/fixed-header.tsx | 2 ++ web/src/components/layout/github.tsx | 35 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 web/src/components/layout/github.tsx diff --git a/web/src/components/layout/fixed-header.tsx b/web/src/components/layout/fixed-header.tsx index 6286fde..c7b0f08 100644 --- a/web/src/components/layout/fixed-header.tsx +++ b/web/src/components/layout/fixed-header.tsx @@ -8,6 +8,7 @@ import { ThemeSwitch } from "../theme-switch"; import { ProfileDropdown } from "../profile-dropdown"; import { Header } from "./header"; import { NotificationPopover } from "./notification"; +import { GithubLinkButton } from "./github"; export const FixedHeader = () => { return ( @@ -15,6 +16,7 @@ export const FixedHeader = () => { {/* */}
+
diff --git a/web/src/components/layout/github.tsx b/web/src/components/layout/github.tsx new file mode 100644 index 0000000..2cc788c --- /dev/null +++ b/web/src/components/layout/github.tsx @@ -0,0 +1,35 @@ +/* + * Copyright © 2025 rustmailer.com + * Licensed under RustMailer License Agreement v1.0 + * Unauthorized use or distribution is prohibited. + */ + +import React from "react"; +import { GitHubLogoIcon } from "@radix-ui/react-icons"; + +interface GithubLinkButtonProps { + /** GitHub repository or profile URL */ + href?: string; + /** Icon size (default: 20) */ + size?: number; + /** Optional tooltip title */ + title?: string; +} + +export const GithubLinkButton: React.FC = ({ + href = "https://github.com/rustmailer/rustmailer", + size = 20, + title = "View on GitHub", +}) => { + return ( + + + + ); +};