@xsolla/xui-progress-line 0.99.0 → 0.101.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 +62 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,27 +1,80 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Progress Line
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A cross-platform React linear progress bar component for displaying completion status horizontally.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
+
npm install @xsolla/xui-progress-line
|
|
9
|
+
# or
|
|
8
10
|
yarn add @xsolla/xui-progress-line
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Demo
|
|
14
|
+
|
|
15
|
+
### Basic Progress Line
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import * as React from 'react';
|
|
19
|
+
import { ProgressLine } from '@xsolla/xui-progress-line';
|
|
20
|
+
|
|
21
|
+
export default function BasicProgressLine() {
|
|
22
|
+
return <ProgressLine value={75} />;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Progress Line Sizes
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import * as React from 'react';
|
|
30
|
+
import { ProgressLine } from '@xsolla/xui-progress-line';
|
|
31
|
+
|
|
32
|
+
export default function ProgressLineSizes() {
|
|
33
|
+
return (
|
|
34
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
35
|
+
<ProgressLine value={60} size="sm" />
|
|
36
|
+
<ProgressLine value={60} size="md" />
|
|
37
|
+
<ProgressLine value={60} size="lg" />
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### With Label
|
|
12
44
|
|
|
13
45
|
```tsx
|
|
46
|
+
import * as React from 'react';
|
|
14
47
|
import { ProgressLine } from '@xsolla/xui-progress-line';
|
|
15
48
|
|
|
16
|
-
|
|
49
|
+
export default function ProgressLineWithLabel() {
|
|
50
|
+
const [progress, setProgress] = React.useState(45);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div>
|
|
54
|
+
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 8 }}>
|
|
55
|
+
<span>Uploading...</span>
|
|
56
|
+
<span>{progress}%</span>
|
|
57
|
+
</div>
|
|
58
|
+
<ProgressLine value={progress} />
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
17
62
|
```
|
|
18
63
|
|
|
19
|
-
##
|
|
64
|
+
## API Reference
|
|
20
65
|
|
|
21
66
|
### ProgressLine
|
|
22
67
|
|
|
68
|
+
**ProgressLine Props:**
|
|
69
|
+
|
|
23
70
|
| Prop | Type | Default | Description |
|
|
24
|
-
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
71
|
+
| :--- | :--- | :------ | :---------- |
|
|
72
|
+
| value | `number` | `0` | Progress value (0-100). |
|
|
73
|
+
| size | `"sm" \| "md" \| "lg"` | `"md"` | Height of the progress line. |
|
|
74
|
+
|
|
75
|
+
## Theming
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
theme.colors.background.brand.primary // Progress fill color
|
|
79
|
+
theme.colors.background.secondary // Track color
|
|
80
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-progress-line",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.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.101.0",
|
|
14
|
+
"@xsolla/xui-primitives-core": "0.101.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=16.8.0",
|