/*! Strand UI | MIT License | dillingerstaffing.com */ import type { JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface LinkProps extends JSX.HTMLAttributes { href: string; /** Opens in a new tab with `rel="noopener noreferrer"`. */ external?: boolean; /** `inherit` takes the surrounding text colour, e.g. a title that is a link. */ variant?: "default" | "cta" | "mono" | "inherit"; } /** * Styled anchor. * * @example * Read the docs */ export const Link = forwardRef( ({ href, external = false, variant = "default", className = "", children, ...rest }, ref) => ( {children} ), ); Link.displayName = "Link";