2024-03-08 21:31:27 +08:00
|
|
|
import type { ReactNode } from 'react';
|
2022-11-02 16:25:28 +08:00
|
|
|
import type {
|
|
|
|
TourProps as RCTourProps,
|
|
|
|
TourStepProps as RCTourStepProps,
|
|
|
|
} from '@rc-component/tour';
|
|
|
|
|
2022-11-30 11:05:41 +08:00
|
|
|
export interface TourProps extends Omit<RCTourProps, 'renderPanel'> {
|
2022-11-02 16:25:28 +08:00
|
|
|
steps?: TourStepProps[];
|
|
|
|
prefixCls?: string;
|
|
|
|
current?: number;
|
2023-02-07 23:36:52 +08:00
|
|
|
indicatorsRender?: (current: number, total: number) => ReactNode;
|
2023-10-03 05:44:09 +08:00
|
|
|
type?: 'default' | 'primary'; // default type, affects the background color and text color
|
2022-11-30 11:05:41 +08:00
|
|
|
}
|
2022-11-02 16:25:28 +08:00
|
|
|
|
|
|
|
export interface TourStepProps extends RCTourStepProps {
|
2023-10-03 05:44:09 +08:00
|
|
|
cover?: ReactNode; // Display pictures or videos
|
2022-11-24 15:38:42 +08:00
|
|
|
nextButtonProps?: {
|
|
|
|
children?: ReactNode;
|
|
|
|
onClick?: () => void;
|
|
|
|
className?: string;
|
|
|
|
style?: React.CSSProperties;
|
|
|
|
};
|
|
|
|
prevButtonProps?: {
|
|
|
|
children?: ReactNode;
|
|
|
|
onClick?: () => void;
|
|
|
|
className?: string;
|
|
|
|
style?: React.CSSProperties;
|
|
|
|
};
|
2023-02-07 23:36:52 +08:00
|
|
|
indicatorsRender?: (current: number, total: number) => ReactNode;
|
2023-10-03 05:44:09 +08:00
|
|
|
type?: 'default' | 'primary'; // default type, affects the background color and text color
|
2022-11-02 16:25:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface TourLocale {
|
|
|
|
Next: string;
|
|
|
|
Previous: string;
|
|
|
|
Finish: string;
|
|
|
|
}
|