summaryrefslogtreecommitdiff
path: root/src/components/inline-link.tsx
blob: f507688e6c3d284c7c370ae9dd12e0ae1db63075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { cn } from '@/lib/utils';
import Link from 'next/link';
import type { ReactNode } from 'react';

export const InlineLink = ({
  href,
  children,
  blank = false,
  className,
}: {
  href: string;
  children: ReactNode;
  blank?: boolean;
  className?: string;
}) => {
  return (
    <Link
      href={href}
      className={cn(
        'text-fd-primary underline duration-300 hover:text-fd-primary/70',
        className,
      )}
      target={blank ? '_blank' : undefined}
    >
      {children}
    </Link>
  );
};