Add showPagePicker, showPerPagePicker props to Pagination component#3980
Add showPagePicker, showPerPagePicker props to Pagination component#3980findingsimple merged 5 commits intomasterfrom
Conversation
psealock
left a comment
There was a problem hiding this comment.
@danielbitzer this is fantastic and a great way to reuse functionality!
Generally, we provide test instructions for reviewers and add the "Needs review" tag if its ready for review. Since the marketing material is harder for testers, I think this would be a great opportunity to contribute to our move to Storybook for documentation.
If you create a stories folder, ie https://github.com/woocommerce/woocommerce-admin/tree/master/packages/components/src/rating/stories, then npm run storybook will render the component and allow change of props for testing. Is this all thats needed @haszari?
Great idea, sounds right to me @psealock ! @danielbitzer Ping me if you get stuck with this, we have good time zone crossover. Also should be mentioned – in blocks we now have storybook built & published on every push to master (check it out here), looks like it's fairly simple to set up (props @nerrad). Would be good to add similar to this repo. |
I considered this. What would be you preference @psealock? If it existed we would use it (currently we use CSS). |
54023cd to
504369a
Compare
|
Went ahead and added a showPageArrowsLabel prop. Also rebased on master to pick up the storybook fix in #4001 |
I would like to use the Pagination component in the slider I'm working on for the marketing tab (#3953). Rather than duplicate this functionality we can gain a lot by using the existing Pagination component. All we need is to hide the parts we don't need.
This this RP adds 2 new props
showPagePickerandshowPerPagePickerwhich remove parts of the pagination component that I don't want for the marketing slider.The PR adds a story for the Pagination component in 2577879 which you can use to try out the new properties.
Accessibility
prefers-reduced-motionDetailed test instructions:
npm run storybook