UNPKG

@atlaskit/spotlight

Version:

A spotlight introduces users to points of interest, from focused messages to multi-step tours.

46 lines (45 loc) 1.69 kB
/** * @jsxRuntime classic * @jsx jsx */ import { type ReactNode } from 'react'; export interface SpotlightSecondaryLinkProps { /** * A `testId` prop is provided for specified elements, which is a unique * string that appears as a data attribute `data-testid` in the rendered code, * serving as a hook for automated tests */ testId?: string; /** * Text to be rendered inside the link. */ children: ReactNode; /** * The destination URL. Accepts a URL string, or a router config object when using AppProvider's router link. */ href: string; /** * Target attribute for the link (e.g. `_blank`). */ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target']; /** * Rel attribute for the link (e.g. `noopener noreferrer` for `target="_blank"`). */ rel?: string; /** * Handler called when the link is clicked. The second argument provides an Atlaskit UI analytics event when using Anchor. */ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void; /** * An accessible label to read out in the event that the displayed text does not provide enough context. */ 'aria-label'?: string; } /** * __Spotlight secondary link__ * * `SpotlightSecondaryLink` is a link-styled secondary control that mirrors the appearance of `SpotlightSecondaryAction`. * Use it when the secondary control should navigate to a URL instead of performing an action (e.g. "Learn more", "View docs"). * */ export declare const SpotlightSecondaryLink: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightSecondaryLinkProps> & React.RefAttributes<HTMLAnchorElement>>;