@@ -25,7 +25,7 @@ const meta = {
2525 } ,
2626 isTotalCountClipped : {
2727 description : 'Whether total_count is clipped for performance reasons.' ,
28- control : 'number ' ,
28+ control : 'boolean ' ,
2929 } ,
3030 onPageChange : {
3131 description : 'Optional callback function that is called when a page is selected.' ,
@@ -58,3 +58,58 @@ export const Default: Story = {
5858 await expect ( activePage ) . toHaveAttribute ( 'aria-current' , 'page' )
5959 } ,
6060}
61+
62+ export const OnePage : Story = {
63+ args : {
64+ totalCount : 6 ,
65+ selectedPage : 1 ,
66+ rowsPerPage : 10 ,
67+ showFirstPageButton : true ,
68+ showLastPageButton : true ,
69+ isTotalCountClipped : false ,
70+ } ,
71+ }
72+
73+ export const TwoPages : Story = {
74+ args : {
75+ totalCount : 12 ,
76+ selectedPage : 1 ,
77+ rowsPerPage : 10 ,
78+ showFirstPageButton : true ,
79+ showLastPageButton : true ,
80+ isTotalCountClipped : false ,
81+ } ,
82+ }
83+
84+ export const FirstOfMany : Story = {
85+ args : {
86+ totalCount : 614 ,
87+ selectedPage : 1 ,
88+ rowsPerPage : 10 ,
89+ showFirstPageButton : true ,
90+ showLastPageButton : true ,
91+ isTotalCountClipped : false ,
92+ } ,
93+ }
94+
95+ export const FirstWithClippedTotal : Story = {
96+ args : {
97+ totalCount : 1000 ,
98+ selectedPage : 1 ,
99+ rowsPerPage : 10 ,
100+ showFirstPageButton : true ,
101+ showLastPageButton : true ,
102+ isTotalCountClipped : true ,
103+ } ,
104+ }
105+
106+ export const WithClippedTotalWithinRange : Story = {
107+ args : {
108+ totalCount : 1000 ,
109+ selectedPage : 10 ,
110+ rowsPerPage : 10 ,
111+ showFirstPageButton : true ,
112+ showLastPageButton : true ,
113+ isTotalCountClipped : true ,
114+ } ,
115+ }
0 commit comments