@atlaskit/spotlight
Version:
A spotlight introduces users to points of interest, from focused messages to multi-step tours.
39 lines (38 loc) • 1.34 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import { type ReactNode } from 'react';
import { type PressableProps } from '@atlaskit/primitives/compiled';
export interface SpotlightPrimaryActionProps {
/**
* 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 `SpotlightActions`.
*/
children: ReactNode;
/**
* Visual style of the button. Defaults to `outline`.
*/
appearance?: 'outline' | 'primary';
/**
* The action to take when the button is clicked.
*/
onClick?: PressableProps['onClick'];
/**
* An accessible label to read out in the event that the displayed text does not provide enough context.
*/
'aria-label'?: string;
}
/**
* __Spotlight primary action__
*
* `SpotlightPrimaryAction` is required for all `Spotlight` components. It should be used to dismiss the spotlight
* for single step spotlights, or to show the next step on multi step spotlight tours.
*
*/
export declare const SpotlightPrimaryAction: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightPrimaryActionProps> & React.RefAttributes<HTMLButtonElement>>;