import type { ComponentProps } from 'react'; import { colorClass, cx } from '../classes'; import type { Color } from '../types'; import { useDefaults } from '../runtime'; /** Props for {@link Link}. Accepts all native `` attributes except `color`. */ export interface LinkProps extends Omit, 'color'> { /** * Link color, from the `colors` config. * @default config.defaults.color */ color?: Color; /** * When to underline. Keep `'always'` for links inside running text, so they don't rely on color alone. * @default 'always' */ underline?: 'always' | 'hover' | 'none'; /** Opens in a new tab with `rel="noopener noreferrer"`. */ external?: boolean; } /** * A text link that inherits the surrounding text style. * * @example * ```tsx * Read the docs * Example * ``` */ export function Link({ color, underline = 'always', external, className, ...props }: LinkProps) { const own = useDefaults('Link'); return ( ); }