Files
blitzkit/src/components/Link.tsx
T

29 lines
597 B
TypeScript
Raw Normal View History

2024-05-20 21:00:47 -05:00
import {
Link as RadixLink,
LinkProps as RadixLinkProps,
} from '@radix-ui/themes';
import NextLink from 'next/link';
interface LinkProps extends RadixLinkProps {
href: string;
}
export function Link({ href, children, target, onClick, ...props }: LinkProps) {
return (
<RadixLink
href={href}
onClick={(event) => event.preventDefault()}
{...props}
>
<NextLink
2024-05-21 14:18:21 -05:00
tabIndex={-1}
2024-05-20 21:00:47 -05:00
href={href}
target={target}
onClick={onClick}
style={{ all: 'inherit' }}
>
{children}
</NextLink>
</RadixLink>
);
}