import { JSX } from "preact"; /** * Props for the Link component */ type Props = Omit, "href"> & { /** URL for the link */ href: string; /** Whether this is an external link that should show an outbound icon */ isExternal?: boolean; /** Link text content */ children: JSX.Element | string; }; /** * A link component that handles external links with appropriate styling and accessibility. * Automatically adds external link icon and proper attributes for external links. */ export function Link(props: Props) { const { isExternal = false, class: className = "", children, href, ...rest } = props; // SVG for external link icon const externalLinkIcon = ( ); return ( {children} {isExternal && externalLinkIcon} ); }