2025-02-21 11:49:56 +00:00
|
|
|
import { cn } from "@/lib/utils";
|
2025-02-20 16:07:45 +00:00
|
|
|
import { siteConfig } from "@/config/site";
|
2025-04-15 10:22:21 +00:00
|
|
|
import { useTranslations } from 'next-intl';
|
2025-02-20 16:07:45 +00:00
|
|
|
import { ArrowRightIcon } from "lucide-react";
|
|
|
|
|
|
|
|
interface BannerProps {
|
|
|
|
className?: string;
|
|
|
|
link?: string;
|
|
|
|
text?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function Banner({
|
|
|
|
className,
|
|
|
|
link = siteConfig.url.repo.github,
|
2025-04-15 10:22:21 +00:00
|
|
|
text,
|
2025-02-20 16:07:45 +00:00
|
|
|
...props
|
|
|
|
}: BannerProps) {
|
2025-04-15 10:22:21 +00:00
|
|
|
const t = useTranslations();
|
|
|
|
|
2025-02-20 16:07:45 +00:00
|
|
|
return (
|
2025-02-21 11:49:56 +00:00
|
|
|
<header
|
|
|
|
{...props}
|
2025-03-07 07:31:22 +00:00
|
|
|
className={cn(
|
2025-03-30 12:21:59 +00:00
|
|
|
"h-12 flex flex-none items-center justify-center bg-muted text-foreground",
|
2025-03-07 07:31:22 +00:00
|
|
|
className
|
|
|
|
)}
|
2025-02-21 11:49:56 +00:00
|
|
|
>
|
2025-02-21 13:20:52 +00:00
|
|
|
<p className="flex justify-center text-sm">
|
|
|
|
<a href={link} className="group">
|
|
|
|
<span className="me-1 text-base leading-none">✨</span>
|
2025-04-15 10:22:21 +00:00
|
|
|
{text || t("Banner.Text")}
|
2025-02-21 13:20:52 +00:00
|
|
|
<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>
|
2025-02-21 11:49:56 +00:00
|
|
|
</header>
|
2025-02-20 16:07:45 +00:00
|
|
|
);
|
|
|
|
}
|