mirror of
https://github.com/rustmailer/rustmailer.git
synced 2026-09-21 00:02:12 +00:00
feat(ui): add GithubLinkButton component
This commit is contained in:
@@ -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 = () => {
|
||||
{/* <Search /> */}
|
||||
<div className='ml-auto flex items-center space-x-4'>
|
||||
<NotificationPopover />
|
||||
<GithubLinkButton />
|
||||
<ThemeSwitch />
|
||||
<ProfileDropdown />
|
||||
</div>
|
||||
|
||||
@@ -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<GithubLinkButtonProps> = ({
|
||||
href = "https://github.com/rustmailer/rustmailer",
|
||||
size = 20,
|
||||
title = "View on GitHub",
|
||||
}) => {
|
||||
return (
|
||||
<a
|
||||
href={href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title={title}
|
||||
className="inline-flex items-center justify-center rounded-full p-2 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors"
|
||||
>
|
||||
<GitHubLogoIcon className="w-5 h-5" style={{ width: size, height: size }} />
|
||||
</a>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user