mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
feat(banner): add Banner component for project promotion with GitHub link
This commit is contained in:
parent
8d6e5067dc
commit
62ccb1fbcc
31
src/components/banner.tsx
Normal file
31
src/components/banner.tsx
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import { siteConfig } from "@/config/site";
|
||||||
|
import { ArrowRightIcon } from "lucide-react";
|
||||||
|
|
||||||
|
interface BannerProps {
|
||||||
|
className?: string;
|
||||||
|
link?: string;
|
||||||
|
text?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Banner({
|
||||||
|
className,
|
||||||
|
link = siteConfig.url.repo.github,
|
||||||
|
text = "Star this project if you like it.",
|
||||||
|
...props
|
||||||
|
}: BannerProps) {
|
||||||
|
return (
|
||||||
|
<div className={className} {...props}>
|
||||||
|
<p className="flex justify-center text-sm">
|
||||||
|
<a href={link} className="group">
|
||||||
|
<span className="me-1 text-base leading-none">✨</span>
|
||||||
|
{text}
|
||||||
|
<ArrowRightIcon
|
||||||
|
className="ms-2 -mt-0.5 inline-flex opacity-60 transition-transform group-hover:translate-x-0.5"
|
||||||
|
size={16}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user