@xsolla/xui-list 0.96.0 → 0.97.0-pr154.1771807405
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 +43 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @xsolla/xui-list
|
|
2
|
+
|
|
3
|
+
Structured list container with interactive rows and optional section title groupings.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-list
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { List } from '@xsolla/xui-list';
|
|
15
|
+
|
|
16
|
+
function MyComponent() {
|
|
17
|
+
return (
|
|
18
|
+
<List>
|
|
19
|
+
<List.Title>Section</List.Title>
|
|
20
|
+
<List.Row hoverable onClick={() => console.log('pressed')}>
|
|
21
|
+
Item 1
|
|
22
|
+
</List.Row>
|
|
23
|
+
<List.Row>Item 2</List.Row>
|
|
24
|
+
</List>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Components
|
|
30
|
+
|
|
31
|
+
- **List** — Full-width column container with list role
|
|
32
|
+
- **List.Row** — Individual row; interactive when `onClick` or `hoverable` is set
|
|
33
|
+
- **List.Title** — Section header rendered on a secondary background
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
### List.Row
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Default | Description |
|
|
40
|
+
|------|------|---------|-------------|
|
|
41
|
+
| `hoverable` | `boolean` | — | Apply hover background even without a press handler |
|
|
42
|
+
| `onClick` | `() => void` | — | Click/press handler; makes row interactive |
|
|
43
|
+
| `onPress` | `() => void` | — | Alias for `onClick` (React Native compat) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-list",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.0-pr154.1771807405",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-avatar": "0.
|
|
14
|
-
"@xsolla/xui-core": "0.
|
|
15
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-avatar": "0.97.0-pr154.1771807405",
|
|
14
|
+
"@xsolla/xui-core": "0.97.0-pr154.1771807405",
|
|
15
|
+
"@xsolla/xui-primitives-core": "0.97.0-pr154.1771807405"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=16.8.0",
|