-
-
Notifications
You must be signed in to change notification settings - Fork 652
Allow arrow padding to be configured for a step. #3051
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -211,8 +211,13 @@ export function getFloatingUIOptions( | |||||||||
| ); | ||||||||||
|
|
||||||||||
| if (arrowEl) { | ||||||||||
| const arrowOptions = | ||||||||||
| typeof step.options.arrow === "object" | ||||||||||
| ? step.options.arrow | ||||||||||
| : { padding: 4 }; | ||||||||||
|
|
||||||||||
|
Comment on lines
+214
to
+218
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| options.middleware.push( | ||||||||||
| arrow({ element: arrowEl, padding: hasEdgeAlignment ? 4 : 0 }) | ||||||||||
| arrow({ element: arrowEl, padding: hasEdgeAlignment ? arrowOptions.padding : 0 }) | ||||||||||
|
||||||||||
| arrow({ element: arrowEl, padding: hasEdgeAlignment ? arrowOptions.padding : 0 }) | |
| arrow({ element: arrowEl, padding: hasEdgeAlignment ? step.options.arrow?.padding ?? 4 : 0 }) |
What would you think about putting this inline here? I think it is a little less verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work since the existing model allows arrow to be a boolean. (Which I kept to avoid a breaking change). We need to handle the case where step.options.arrow is a boolean which is why I wrote this way I did.
Uh oh!
There was an error while loading. Please reload this page.