UNPKG

@atlaskit/spotlight

Version:

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

50 lines (49 loc) 1.79 kB
/** * @jsxRuntime classic * @jsx jsx */ import { type ReactNode } from 'react'; export interface SpotlightPrimaryLinkProps { /** * 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; /** * Visual style of the button. Defaults to `outline`. */ appearance?: 'outline' | 'primary'; /** * 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 primary link__ * * `SpotlightPrimaryLink` is a link-styled primary control that mirrors the appearance of `SpotlightPrimaryAction`. * Use it when the primary control should navigate to a URL instead of performing an action (e.g. "Get started", "View guide"). * */ export declare const SpotlightPrimaryLink: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightPrimaryLinkProps> & React.RefAttributes<HTMLAnchorElement>>;