import { LinkProps } from "next/link"; import React, { PropsWithChildren } from "react"; export type TNewTabLink = React.PropsWithChildren & { className?: string; target?: string; }; const Link = ({ href, NewTabLink, children, className, }: PropsWithChildren<{ href: string; NewTabLink?: (props: TNewTabLink) => JSX.Element; className?: string; }>) => { if (NewTabLink) { return ( {children} ); } return ( {children} ); }; export default Link;