@atlaskit/onboarding
Version:
An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
28 lines (27 loc) • 1.25 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import { type ReactElement } from 'react';
interface NodeResolverSpotlightTargetProps {
hasNodeResolver: boolean;
children: ReactElement;
getTargetRef: (name: string) => (element: HTMLElement | null | undefined) => void;
name: string;
}
/**
* A wrapper component that conditionally applies a NodeResolver to its children.
*
* Note: NodeResolver should not be used in React 18 concurrent mode. This component
* is intended to be removed once the feature flag is removed.
* @param {boolean} props.hasNodeResolver - Determines whether to apply the NodeResolver.
* @param {ReactElement} props.children - The child elements to be wrapped.
* @param {string} props.name - The name to reference from Spotlight.
* @param {ReactElement} props.getTargetRef - Setting up Target Node in Spotlight Manager.
* @returns {ReactElement} The children wrapped with NodeResolver if hasNodeResolver is true, wrape the children in a div setting innerRef with ref to the div.
*/
declare const NodeResolverSpotlightTarget: {
({ hasNodeResolver, children, getTargetRef, name, }: NodeResolverSpotlightTargetProps): JSX.Element;
displayName: string;
};
export default NodeResolverSpotlightTarget;