Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Tour arrowPointAtCenter could be configured #46301

Merged
merged 1 commit into from Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions components/tour/index.tsx
Expand Up @@ -40,13 +40,14 @@ const Tour: React.FC<TourProps> & { _InternalPanelDoNotUseOrYouWillBeFired: type
[steps, type],
);

const builtinPlacements = getPlacements({
arrowPointAtCenter: true,
autoAdjustOverflow: true,
offset: token.marginXXS,
arrowWidth: token.sizePopupArrow,
borderRadius: token.borderRadius,
});
const builtinPlacements: TourProps['builtinPlacements'] = (config) =>
getPlacements({
arrowPointAtCenter: config?.arrowPointAtCenter ?? true,
autoAdjustOverflow: true,
offset: token.marginXXS,
arrowWidth: token.sizePopupArrow,
borderRadius: token.borderRadius,
});

const customClassName = classNames(
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -119,7 +119,7 @@
"@ctrl/tinycolor": "^3.6.1",
"@rc-component/color-picker": "~1.4.1",
"@rc-component/mutate-observer": "^1.1.0",
"@rc-component/tour": "~1.11.1",
"@rc-component/tour": "~1.12.0",
"@rc-component/trigger": "^1.18.2",
"classnames": "^2.3.2",
"copy-to-clipboard": "^3.3.3",
Expand Down