@atlaskit/onboarding
Version:
An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
46 lines (45 loc) • 1.42 kB
TypeScript
import React, { type ReactNode } from 'react';
interface SpotlightTransitionProps {
/**
* Children that are conditionally rendered. The transition happens based
* on the existence or non-existence of children.
*/
children?: ReactNode;
}
interface State {
currentChildren: ReactNode;
}
interface SpotlightTransitionContextModel {
isOpen: boolean;
onExited: () => void;
}
/**
* __Spotlight transition__
*
* A spotlight transition holds onto spotlights so they can fade out when exiting the viewport.
*
* - [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.
*/
declare class SpotlightTransition extends React.Component<SpotlightTransitionProps, State> {
static getDerivedStateFromProps(props: SpotlightTransitionProps, state: State): {
currentChildren: React.ReactNode;
};
state: {
currentChildren: undefined;
};
onExited: () => void;
render(): React.JSX.Element;
}
/**
* __Spotlight transition consumer__
*
* Used to consume the spotlight transition context through render props.
*
* @internal
*/
export declare const SpotlightTransitionConsumer: React.Consumer<SpotlightTransitionContextModel>;
export default SpotlightTransition;