- Schema.org JSON-LD templates (product, event, local-business, faq) - Brand, UI, SEO, and decision guide rules - Working code snippets (vendor-card, schema-inject, deploy-webhook) - JSON schemas for project config validation - Client presets (slc-bride, default) - Self-update protocol with changelog tracking Made-with: Cursor
39 lines
909 B
TypeScript
39 lines
909 B
TypeScript
import Link from 'next/link'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface InternalLinkProps {
|
|
href: string
|
|
children: React.ReactNode
|
|
className?: string
|
|
variant?: 'default' | 'muted' | 'underline'
|
|
}
|
|
|
|
export function InternalLink({
|
|
href,
|
|
children,
|
|
className,
|
|
variant = 'default',
|
|
}: InternalLinkProps) {
|
|
const variants = {
|
|
default: 'text-primary hover:text-primary/80',
|
|
muted: 'text-muted-foreground hover:text-foreground',
|
|
underline: 'text-foreground underline underline-offset-4 hover:text-primary',
|
|
}
|
|
|
|
return (
|
|
<Link
|
|
href={href}
|
|
className={cn(
|
|
'transition-colors duration-200',
|
|
variants[variant],
|
|
className
|
|
)}
|
|
>
|
|
{children}
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
// Usage example:
|
|
// <InternalLink href="/vendors/photography">Wedding Photography</InternalLink>
|
|
// <InternalLink href="/venues" variant="muted">View all venues</InternalLink>
|