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
feat: adding vertical dots [STRY-301] #626
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
tamstephanie
approved these changes
May 13, 2024
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.
Just two tiny suggestions, but otherwise, looks awesome!
tamstephanie
approved these changes
May 13, 2024
lukaskeelwapo
approved these changes
May 14, 2024
@@ -134,7 +169,7 @@ function configureDots(nPages: number, activeIndex: number, amount: number) { | |||
// default: active dot has scale = 1, each dot previous/next's scale reduces by 25% | |||
let scale = 1 - stepsFromActive / 4; | |||
if (amount <= 5 && stepsFromActive > 1) { | |||
// if there are 5 or less dots, make all dots at least 4px | |||
// if there are 5 or fewer dots, make all dots at least 4px |
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.
💯
artmsilva
approved these changes
May 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
STRY-301
I made it so the pagination dots can be orientated vertically. However, horizontal dots remain the default. I also added supporting documentation to the docs.
https://wpds-ui-kit-git-stry-301-vert-dots.preview.now.washingtonpost.com/playroom?edit=1&code=KYDwDg9gTgLgBAE2AMwIYFcA29noHYDGMAlhHnAKIioC2YmwAFAJRwDeAUHHFMDOlHKMu3OAB4AQhBAjRcAgGcFAXjac5chMQX1UATwBccAETIGIYwBpZGs6AAixXkVJ4jxghEzoaeKze4AX0CbAD4A8SkZDVFFFTUIzW1dQxM7C2sYuQBzVDAjGAALYBpgADodVAJgAG0ARgAGBoBdTKzuSAViEjJ3XkxUEgA3YH924Ijw9rEABVRs4jxB13sIGAU4Wgh8GFUANkC4RaQQVTrDgYAjYExlYzB5xeWyRDWFYzgAeimNMU%2Bon5ySTSRLyJSqdTtRDJAapUzmMZQ3L5OBFErlSrVepNVqg7g0VBQBZ4CSYCAEADWAGUYISYAViqUKg8sQAmHFtdqdbquPo3ZYjRExCYxQG-ObE554VbrPGbGjbPC7NgHOXHUBnEJQuBXG53B6SnrkBBvYxy6DEYBKqV3EawYgEVCYM3tb4RP4Amwe6Q-ZgAbg4gSAA&isGuide=none
Play with the differing props in the dots to stress test the component.