Feature/move list to client (#50)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-01 15:02:12 +02:00
committed by GitHub
parent c2abdaadf2
commit 668434d246
181 changed files with 2922 additions and 1959 deletions

View File

@@ -0,0 +1,62 @@
import { cn } from '@/utils/cn';
import Link from 'next/link';
export function PageTabs({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) {
return (
<div className={cn('overflow-x-auto', className)}>
<div className="flex gap-4 whitespace-nowrap text-3xl font-semibold">
{children}
</div>
</div>
);
}
export function PageTabsLink({
href,
children,
isActive = false,
}: {
href: string;
children: React.ReactNode;
isActive?: boolean;
}) {
return (
<Link
className={cn(
'inline-block opacity-100 transition-transform hover:translate-y-[-1px]',
isActive ? 'opacity-100' : 'opacity-50'
)}
href={href}
>
{children}
</Link>
);
}
export function PageTabsItem({
onClick,
children,
isActive = false,
}: {
onClick: () => void;
children: React.ReactNode;
isActive?: boolean;
}) {
return (
<button
className={cn(
'inline-block opacity-100 transition-transform hover:translate-y-[-1px]',
isActive ? 'opacity-100' : 'opacity-50'
)}
onClick={onClick}
>
{children}
</button>
);
}