UNPKG

@atlaskit/onboarding

Version:

An onboarding spotlight introduces new features to users through focused messages or multi-step tours.

32 lines 1.32 kB
import React from 'react'; import { fg } from '@atlaskit/platform-feature-flags/fg'; import NodeResolverSpotlightTarget from './node-resolver-spotlight-target'; import { TargetConsumer } from './spotlight-manager'; /** * __Spotlight target__ * * A spotlight target marks a component to be used for introducing new features to users through focused messages or multi-step tours. * * - [Examples](https://atlassian.design/components/onboarding/examples) * - [Code](https://atlassian.design/components/onboarding/code) * - [Usage](https://atlassian.design/components/onboarding/usage) * * @deprecated Use `@atlaskit/spotlight` instead. */ const SpotlightTarget = ({ children, name }) => /*#__PURE__*/React.createElement(TargetConsumer, null, getTargetRef => { if (typeof children === 'function') { return children({ targetRef: getTargetRef === null || getTargetRef === void 0 ? void 0 : getTargetRef(name) }); } return getTargetRef ? /*#__PURE__*/React.createElement(NodeResolverSpotlightTarget, { name: name, hasNodeResolver: !fg('platform_design_system_team_onboarding_noderesolve'), getTargetRef: getTargetRef }, /*#__PURE__*/React.createElement(React.Fragment, null, children)) : children; }); SpotlightTarget.displayName = 'SpotlightTarget'; export default SpotlightTarget;