@xsolla/xui-image 0.95.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.
Files changed (2) hide show
  1. package/README.md +36 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # @xsolla/xui-image
2
+
3
+ Image component with aspect ratio control and an optional overlay slot.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-image
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Image } from '@xsolla/xui-image';
15
+
16
+ <Image
17
+ src="https://example.com/photo.jpg"
18
+ alt="A landscape"
19
+ ratio="16:9"
20
+ borderRadius={8}
21
+ />
22
+ ```
23
+
24
+ ## Props
25
+
26
+ ### Image
27
+
28
+ | Prop | Type | Default | Description |
29
+ |------|------|---------|-------------|
30
+ | `src` | `string` | — | Image source URL |
31
+ | `alt` | `string` | `""` | Image alt text |
32
+ | `ratio` | `"1:1" \| "2:3" \| "3:2" \| "16:9" \| "4:3" \| "9:16" \| "Custom"` | `"1:1"` | Aspect ratio of the image |
33
+ | `customRatio` | `string \| number` | — | Custom ratio when `ratio` is `"Custom"` (e.g. `"21 / 9"`) |
34
+ | `slot` | `ReactNode` | — | Overlay or placeholder content rendered over the image |
35
+ | `width` | `number \| string` | `"100%"` | Width of the image container |
36
+ | `borderRadius` | `number \| string` | `0` | Border radius of the container |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-image",
3
- "version": "0.95.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.95.0",
14
- "@xsolla/xui-primitives-core": "0.95.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",