Files
co-lite/solvway-admin-portal/app/components/app/PoweredBy.tsx
T

39 lines
1.1 KiB
TypeScript

export const POWERED_BY = {
prefix: "Powered by",
name: "Containerverse Sdn. Bhd.",
href: "https://containerverse.dev/",
short: "CV",
} as const;
// `compact` is the sidebar's icon rail: a short visible mark, with the full name for assistive tech.
export default function PoweredBy({ compact = false }: { compact?: boolean }) {
if (compact) {
return (
<a
href={POWERED_BY.href}
target="_blank"
rel="noopener noreferrer"
title={`${POWERED_BY.prefix} ${POWERED_BY.name}`}
className="text-xs text-muted-foreground hover:text-foreground hover:underline"
>
{/* The accessible name starts with the visible text (WCAG 2.5.3 Label in Name). */}
{POWERED_BY.short}{" "}
<span className="sr-only">{POWERED_BY.name}</span>
</a>
);
}
return (
<span className="text-xs text-muted-foreground">
{POWERED_BY.prefix}{" "}
<a
href={POWERED_BY.href}
target="_blank"
rel="noopener noreferrer"
className="whitespace-nowrap hover:text-foreground hover:underline"
>
{POWERED_BY.name}
</a>
</span>
);
}