@xsolla/xui-pagination 0.95.0 → 0.97.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.
Files changed (2) hide show
  1. package/README.md +43 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @xsolla/xui-pagination
2
+
3
+ Page navigation control with ellipsis truncation, prev/next arrows, and size variants.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-pagination
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Pagination } from '@xsolla/xui-pagination';
15
+
16
+ function MyComponent() {
17
+ const [currentPage, setCurrentPage] = React.useState(1);
18
+
19
+ return (
20
+ <Pagination
21
+ totalPages={10}
22
+ currentPage={currentPage}
23
+ onPageChange={setCurrentPage}
24
+ />
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## Props
30
+
31
+ ### Pagination
32
+
33
+ | Prop | Type | Default | Description |
34
+ |------|------|---------|-------------|
35
+ | `currentPage` | `number` | `1` | Active page (1-indexed) |
36
+ | `totalPages` | `number` | `1` | Total number of pages |
37
+ | `onPageChange` | `(page: number) => void` | — | Called when a page is selected |
38
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size variant |
39
+ | `siblingCount` | `number` | `1` | Page buttons shown either side of current page |
40
+ | `showNavigation` | `boolean` | `true` | Show prev/next arrow buttons |
41
+ | `disabled` | `boolean` | `false` | Disable all interactions |
42
+ | `stretched` | `boolean` | `false` | Stretch to fill container width |
43
+ | `backgroundColor` | `string` | — | Custom background colour |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-pagination",
3
- "version": "0.95.0",
3
+ "version": "0.97.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -10,8 +10,8 @@
10
10
  "build:native": "PLATFORM=native tsup"
11
11
  },
12
12
  "dependencies": {
13
- "@xsolla/xui-core": "0.95.0",
14
- "@xsolla/xui-primitives-core": "0.95.0"
13
+ "@xsolla/xui-core": "0.97.0",
14
+ "@xsolla/xui-primitives-core": "0.97.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": ">=16.8.0"