manuthecoder-react-native-spotlight-tour
Version:
React Native library to implement a highly customizable app tour feature with an awesome spotlight effect
83 lines (82 loc) • 1.91 kB
TypeScript
import { type ReactElement, type ReactNode } from "react";
import { type StyleProp, type TextStyle, type ViewStyle } from "react-native";
import type { RenderProps } from "../../SpotlightTour.context";
export interface TourBoxProps extends RenderProps {
/**
* Back button styles.
*/
backStyle?: StyleProp<ViewStyle>;
/**
* Back button text.
*
* @default Back
*/
backText?: string;
/**
* The TourBox content.
*/
children?: ReactNode;
/**
* Should hide the Back button.
*/
hideBack?: boolean;
/**
* Should hide the Next button.
*/
hideNext?: boolean;
/**
* Next button styles.
*/
nextStyle?: StyleProp<ViewStyle>;
/**
* Next button text.
*
* @default Next
*/
nextText?: string;
/**
* Callback for when the Back button is pressed.
*/
onBack?: () => void;
/**
* Callback for when the Next button is pressed.
*/
onNext?: () => void;
/**
* Callback for when the Pause button is pressed.
*/
onPause?: () => void;
/**
* Back button styles.
*/
pauseStyle?: StyleProp<ViewStyle>;
/**
* Pause button text.
*/
pauseText?: string;
/**
* Should show the Pause button.
*/
showPause?: boolean;
/**
* TourBox main container styles.
*/
style?: StyleProp<ViewStyle>;
/**
* TourBox title text.
*/
title?: string;
/**
* TourBox title styles.
*/
titleStyle?: StyleProp<TextStyle>;
}
/**
* A built-in TourBox component which can be used as a tooltip container for
* each step. While it's highly customizable, it's not required and can be
* replaced by your own component.
*
* @param props the component props
* @returns A TourBox React element
*/
export declare function TourBox(props: TourBoxProps): ReactElement;