@xsolla/xui-store-badge 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 +35 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @xsolla/xui-store-badge
|
|
2
|
+
|
|
3
|
+
App store download badge component for Google Play, App Store, and AppGallery.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-store-badge
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { StoreBadge } from '@xsolla/xui-store-badge';
|
|
15
|
+
|
|
16
|
+
function App() {
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<StoreBadge type="google-play" palette="dark" onPress={() => window.open('...')} />
|
|
20
|
+
<StoreBadge type="app-store" palette="light" />
|
|
21
|
+
<StoreBadge type="app-gallery" palette="dark" />
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Default | Description |
|
|
30
|
+
|------|------|---------|-------------|
|
|
31
|
+
| `type` | `"google-play" \| "app-store" \| "app-gallery"` | — | Store to display |
|
|
32
|
+
| `palette` | `"dark" \| "light"` | `"dark"` | Dark (black bg) or light (white bg) |
|
|
33
|
+
| `onPress` | `() => void` | — | Click handler |
|
|
34
|
+
| `className` | `string` | — | Additional CSS class |
|
|
35
|
+
| `data-testid` | `string` | — | Test ID |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-store-badge",
|
|
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",
|