@xsolla/xui-progress-bar 0.96.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.
- package/README.md +32 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @xsolla/xui-progress-bar
|
|
2
|
+
|
|
3
|
+
Themed progress bar with label, helper text, and error/success states.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-progress-bar
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { ProgressBar } from '@xsolla/xui-progress-bar';
|
|
15
|
+
|
|
16
|
+
<ProgressBar percent={65} label="Uploading..." helperText="65% complete" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
### ProgressBar
|
|
22
|
+
|
|
23
|
+
| Prop | Type | Default | Description |
|
|
24
|
+
|------|------|---------|-------------|
|
|
25
|
+
| `percent` | `number` | `0` | Progress value from 0 to 100 |
|
|
26
|
+
| `size` | `"xl" \| "lg" \| "md" \| "sm" \| "xs"` | `"md"` | Size of the progress bar |
|
|
27
|
+
| `state` | `"default" \| "success" \| "error"` | `"default"` | Visual state affecting bar colour |
|
|
28
|
+
| `label` | `string` | — | Label text displayed above the bar |
|
|
29
|
+
| `helperText` | `string` | — | Helper text displayed below the bar |
|
|
30
|
+
| `errorMessage` | `string` | — | Error text shown when `state` is `"error"` |
|
|
31
|
+
| `labelIcon` | `React.ReactNode` | — | Icon displayed alongside the label |
|
|
32
|
+
| `statusIcon` | `React.ReactNode` | — | Icon displayed at the right of the label row |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-progress-bar",
|
|
3
|
-
"version": "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.
|
|
14
|
-
"@xsolla/xui-primitives-core": "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",
|