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

feat: Add Pagination component #2188

Merged
merged 11 commits into from
Sep 23, 2022
Merged

feat: Add Pagination component #2188

merged 11 commits into from
Sep 23, 2022

Conversation

jcbcapps
Copy link
Contributor

Summary

Adds a new Pagination component.

This is a port of the Pagination component that was built for the USSF Portal. I also wanted to note that I followed the instructions here and used yarn link to successfully test the component in the USSF Portal.

Related Issues or PRs

closes: #1543

How To Test

  1. Run yarn storybook and look at Components/Pagination/Sandbox and change some of the controls to see how the component adjusts.
  2. Run yarn test:coverage and verify that all tests are passing and that the coverage threshold is being met.

Screenshots:

pagination-1
pagination-2

Copy link
Contributor

@gidjin gidjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though would be good to add some tests for the onClick callbacks.

src/components/Pagination/Pagination.tsx Show resolved Hide resolved
@@ -235,6 +235,33 @@ describe('Pagination component', () => {
expect(screen.getAllByText('…')).toHaveLength(1)
})

it('can click onClickNext, onClickPrevious and onClickPagenumber', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Thank you!

Copy link
Contributor

@gidjin gidjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jcbcapps jcbcapps merged commit 4c021d1 into main Sep 23, 2022
@jcbcapps jcbcapps deleted the jc-pagination-component-1543 branch September 23, 2022 15:49
@gidjin gidjin mentioned this pull request Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Component: Pagination
3 participants