@bitrise/bitkit 13.154.0 → 13.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -13,8 +13,8 @@ export type PaginationProps = {
|
|
|
13
13
|
perPage: number;
|
|
14
14
|
totalCount: number;
|
|
15
15
|
setPage: (newPage: number) => void;
|
|
16
|
-
setPerPage: (newPerPage: number) => void;
|
|
17
16
|
itemsPerPageOptions?: number[];
|
|
17
|
+
setPerPage?: (newPerPage: number) => void;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const Pagination = ({
|
|
@@ -31,23 +31,27 @@ const Pagination = ({
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<Box alignItems="center" display="flex" gap="1rem">
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{perPageOption
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
{setPerPage && (
|
|
35
|
+
<>
|
|
36
|
+
<Box alignItems="center" display="flex" gap="0.5rem">
|
|
37
|
+
<Text textStyle="body/md/regular">Items per page:</Text>
|
|
38
|
+
<Dropdown
|
|
39
|
+
onChange={({ target }) => setPerPage(Number(target.value))}
|
|
40
|
+
search={false}
|
|
41
|
+
size="md"
|
|
42
|
+
value={perPage.toString()}
|
|
43
|
+
width="auto"
|
|
44
|
+
>
|
|
45
|
+
{itemsPerPageOptions.map((perPageOption) => (
|
|
46
|
+
<DropdownOption key={perPageOption} value={perPageOption.toString()}>
|
|
47
|
+
{perPageOption}
|
|
48
|
+
</DropdownOption>
|
|
49
|
+
))}
|
|
50
|
+
</Dropdown>
|
|
51
|
+
</Box>
|
|
52
|
+
<Divider color="pal.neutral.90" height="3rem" orientation="vertical" />
|
|
53
|
+
</>
|
|
54
|
+
)}
|
|
51
55
|
<Text as="span" marginRight="auto" textStyle="body/md/regular">
|
|
52
56
|
{itemsStartIndex}-{itemsEndIndex} of {totalCount} items
|
|
53
57
|
</Text>
|