@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.154.0",
4
+ "version": "13.155.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -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
- <Box alignItems="center" display="flex" gap="0.5rem">
35
- <Text textStyle="body/md/regular">Items per page:</Text>
36
- <Dropdown
37
- onChange={({ target }) => setPerPage(Number(target.value))}
38
- search={false}
39
- size="md"
40
- value={perPage.toString()}
41
- width="auto"
42
- >
43
- {itemsPerPageOptions.map((perPageOption) => (
44
- <DropdownOption key={perPageOption} value={perPageOption.toString()}>
45
- {perPageOption}
46
- </DropdownOption>
47
- ))}
48
- </Dropdown>
49
- </Box>
50
- <Divider color="pal.neutral.90" height="3rem" orientation="vertical" />
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>