|
1 | 1 | # Component |
2 | 2 |
|
| 3 | +> Added in `v1.5.0`. |
| 4 | +
|
3 | 5 | ## `paginate()` |
4 | 6 |
|
5 | 7 | Creates a pagination object in accordance with the [pages to show in a pagination component](https://design-system.nationalarchives.gov.uk/components/pagination/#number-of-page-links) in the National Archives Design System. |
@@ -44,13 +46,13 @@ Creates an object that be used directly in a [National Archives pagination compo |
44 | 46 | ```python |
45 | 47 | from tna_utilities.component import paginate |
46 | 48 |
|
47 | | -print(tna_frontend_pagination_items(42, 6, "?page=")) |
| 49 | +print(tna_frontend_pagination_items(42, 7, "?page=")) |
48 | 50 | # [ |
49 | 51 | # {"number": 1, "current": False, "href": "?page=1"}, |
50 | 52 | # {"ellipsis": True}, |
51 | | -# {"number": 5, "current": False, "href": "?page=5"}, |
52 | | -# {"number": 6, "current": True, "href": "?page=6"}, |
53 | | -# {"number": 7, "current": False, "href": "?page=7"}, |
| 53 | +# {"number": 6, "current": False, "href": "?page=6"}, |
| 54 | +# {"number": 7, "current": True, "href": "?page=7"}, |
| 55 | +# {"number": 8, "current": False, "href": "?page=8"}, |
54 | 56 | # {"ellipsis": True}, |
55 | 57 | # {"number": 42, "current": False, "href": "?page=42"}, |
56 | 58 | # ] |
|
0 commit comments