Skip to content

Commit

Permalink
feat: tour ts define update
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Nov 24, 2022
1 parent e8875f1 commit e2383cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/tour/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {
TourProps as RCTourProps,
TourStepProps as RCTourStepProps,
} from '@rc-component/tour';
import type { ButtonProps } from '../button';

export type TourProps = Omit<RCTourProps, 'renderPanel'> & {
steps?: TourStepProps[];
Expand All @@ -15,8 +16,8 @@ export type TourProps = Omit<RCTourProps, 'renderPanel'> & {

export interface TourStepProps extends RCTourStepProps {
cover?: ReactNode; // 展示的图片或者视频
nextButtonProps?: { children?: ReactNode; onClick?: () => void };
prevButtonProps?: { children?: ReactNode; onClick?: () => void };
nextButtonProps?: { children?: ReactNode; onClick?: () => void } & ButtonProps;
prevButtonProps?: { children?: ReactNode; onClick?: () => void } & ButtonProps;
stepRender?: (current: number, total: number) => ReactNode;
type?: 'default' | 'primary'; // default 类型,影响底色与文字颜色
}
Expand Down

0 comments on commit e2383cc

Please sign in to comment.