@xsolla/xui-game-card 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 +41 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @xsolla/xui-game-card
|
|
2
|
+
|
|
3
|
+
Game artwork card with image, title, subtitle, corner tags, and a trailing action.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-game-card
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { GameCard } from '@xsolla/xui-game-card';
|
|
15
|
+
|
|
16
|
+
<GameCard
|
|
17
|
+
image="https://example.com/game.jpg"
|
|
18
|
+
title="Whiteout Survival"
|
|
19
|
+
subtitle="Strategy • Puzzle"
|
|
20
|
+
size="lg"
|
|
21
|
+
buttonText="Activate"
|
|
22
|
+
onButtonClick={() => console.log('clicked')}
|
|
23
|
+
/>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
### GameCard
|
|
29
|
+
|
|
30
|
+
| Prop | Type | Default | Description |
|
|
31
|
+
|------|------|---------|-------------|
|
|
32
|
+
| `image` | `string` | — | Game artwork image URL |
|
|
33
|
+
| `title` | `string` | — | Game title |
|
|
34
|
+
| `subtitle` | `string` | — | Game subtitle (e.g. genre tags) |
|
|
35
|
+
| `size` | `"lg" \| "md" \| "sm"` | `"lg"` | Size variant of the card |
|
|
36
|
+
| `tagsTopLeft` | `ReactNode` | — | Content for top-left corner |
|
|
37
|
+
| `tagsTopRight` | `ReactNode` | — | Content for top-right corner |
|
|
38
|
+
| `trailing` | `ReactNode` | — | Custom trailing content; overrides `buttonText` |
|
|
39
|
+
| `buttonText` | `string` | — | Button label (used when `trailing` is not provided) |
|
|
40
|
+
| `onButtonClick` | `() => void` | — | Button click handler |
|
|
41
|
+
| `onPress` | `() => void` | — | Card press handler |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-game-card",
|
|
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",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"test:coverage": "vitest run --coverage"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@xsolla/xui-core": "0.
|
|
18
|
-
"@xsolla/xui-primitives-core": "0.
|
|
17
|
+
"@xsolla/xui-core": "0.97.0",
|
|
18
|
+
"@xsolla/xui-primitives-core": "0.97.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.8.0",
|