Skip to content

Commit

Permalink
support classname and style
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkasany committed Jan 4, 2025
1 parent a35028b commit 60f48f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const Tour: React.FC<TourProps> = props => {
disabledInteraction,
styles,
classNames: tourClassNames,
className,
style,
...restProps
} = props;

Expand Down Expand Up @@ -228,13 +230,15 @@ const Tour: React.FC<TourProps> = props => {
<Portal open={mergedOpen} autoLock>
<div
className={classNames(
className,
rootClassName,
`${prefixCls}-target-placeholder`,
)}
style={{
...(posInfo || CENTER_PLACEHOLDER),
position: 'fixed',
pointerEvents: 'none',
...style,
}}
/>
</Portal>
Expand Down
2 changes: 2 additions & 0 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export interface TourStepProps extends TourStepInfo {
export interface TourProps extends Pick<TriggerProps, 'onPopupAlign'> {
classNames?: Partial<Record<SemanticName, string>>;
styles?: Partial<Record<SemanticName, React.CSSProperties>>;
className?: string;
style?: React.CSSProperties;
steps?: TourStepInfo[];
open?: boolean;
defaultCurrent?: number;
Expand Down

0 comments on commit 60f48f6

Please sign in to comment.