@atlaskit/onboarding
Version:
An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
55 lines (54 loc) • 1.47 kB
TypeScript
import React, { type MouseEvent } from 'react';
interface CloneProps {
/**
* Whether to display a pulse animation around the spotlighted element.
*/
pulse: boolean;
/**
* An object containing the information used for positioning clone.
*/
style: Record<string, any>;
/**
* The name of the SpotlightTarget.
*/
target?: string;
/**
* The spotlight target node.
*/
targetNode: HTMLElement;
/**
* The background color of the element being highlighted
*/
targetBgColor?: string;
/**
* Function to fire when a person clicks on the cloned target.
*/
targetOnClick?: (eventData: {
event: MouseEvent<HTMLElement>;
target?: string;
}) => void;
/**
* The border radius of the element being highlighted.
*/
targetRadius?: number | string;
/**
* 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;
/**
* Whether to watch for html content changes on the target
*/
shouldWatch?: boolean;
}
/**
* __Clone__
*
* Used for cloning spotlight targets. The clone is positioned on top of the spotlight target with
* a pulsing animation.
*
* @internal
*/
declare const Clone: (props: CloneProps) => React.JSX.Element;
export default Clone;