import React from "react"; import { IconType } from "../icon"; import { StyledLinkProps } from "./link.style"; import { TagProps } from "../../__internal__/utils/helpers/tags/tags"; export interface LinkProps extends React.AriaAttributes, Pick, "download">, TagProps { /** An href for an anchor tag. */ href?: string; /** An icon to display next to the link. */ icon?: IconType; /** Function called when the mouse is clicked. */ onClick?: (ev: React.MouseEvent | React.MouseEvent) => void; /** Function called when a key is pressed. */ onKeyDown?: (ev: React.KeyboardEvent | React.KeyboardEvent) => void; /** Function called when a mouse down event triggers. */ onMouseDown?: (ev: React.MouseEvent | React.MouseEvent) => void; /** Child content to render in the link. */ children?: React.ReactNode; /** Target property in which link should open ie: _blank, _self, _parent, _top */ target?: string; /** Aria label for accessibility purposes */ ariaLabel?: string; /** allows to set rel property in tag */ rel?: string; /** @ignore @private internal prop to be set when no aria-label should be specified */ removeAriaLabelOnIcon?: boolean; /** * @private * @internal * @ignore * Sets className for component. INTERNAL USE ONLY. */ className?: string; /** [Legacy] A message to display as a tooltip to the link. * @deprecated The tooltipMessage prop in Link is deprecated and will soon be removed. */ tooltipMessage?: string; /** [Legacy] Positions the tooltip with the link. * @deprecated The tooltipPosition prop in Link is deprecated and will soon be removed. */ tooltipPosition?: "bottom" | "left" | "right" | "top"; /** @deprecated The disabled state of the link. This prop is deprecated and will soon be removed. */ disabled?: boolean; /** Specifies when the link underline should be displayed. */ underline?: "always" | "hover" | "never"; /** Which side of the link to the render the link. */ iconAlign?: "left" | "right"; /** Allows to create skip link */ isSkipLink?: boolean; /** Allows link styling to be updated for light or dark backgrounds */ variant?: Variants; hasFocus?: boolean; /** Sets the correct link size */ linkSize?: "medium" | "large"; /** Sets the colour styling when component is rendered on a dark background */ inverse?: boolean; /** @deprecated The 'isDarkBackground' prop in Link is deprecated and will soon be removed. Please use 'inverse' prop instead. */ isDarkBackground?: boolean; /** Sets the link style to bold */ bold?: boolean; } type Variants = Exclude; export declare const Link: React.ForwardRefExoticComponent>; export default Link;