From 60f48f6ef4f918fc18d4aa6c5f5e28d5ef8ccb5b Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Sat, 4 Jan 2025 23:48:12 +0800 Subject: [PATCH] support classname and style --- src/Tour.tsx | 4 ++++ src/interface.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Tour.tsx b/src/Tour.tsx index 90a07b0..c54fd16 100644 --- a/src/Tour.tsx +++ b/src/Tour.tsx @@ -53,6 +53,8 @@ const Tour: React.FC = props => { disabledInteraction, styles, classNames: tourClassNames, + className, + style, ...restProps } = props; @@ -228,6 +230,7 @@ const Tour: React.FC = props => {
= props => { ...(posInfo || CENTER_PLACEHOLDER), position: 'fixed', pointerEvents: 'none', + ...style, }} /> diff --git a/src/interface.ts b/src/interface.ts index e173819..6dc07fd 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -50,6 +50,8 @@ export interface TourStepProps extends TourStepInfo { export interface TourProps extends Pick { classNames?: Partial>; styles?: Partial>; + className?: string; + style?: React.CSSProperties; steps?: TourStepInfo[]; open?: boolean; defaultCurrent?: number;