@xsolla/xui-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.
Files changed (2) hide show
  1. package/README.md +31 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @xsolla/xui-badge
2
+
3
+ A small circular indicator for displaying counts, status dots, or short labels.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-badge
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Badge } from "@xsolla/xui-badge";
15
+
16
+ <Badge tone="alert" size="md">9</Badge>
17
+
18
+ {/* Dot-only (no content) */}
19
+ <Badge tone="success" size="sm" />
20
+ ```
21
+
22
+ ## Props
23
+
24
+ ### Badge
25
+
26
+ | Prop | Type | Default | Description |
27
+ |------|------|---------|-------------|
28
+ | `tone` | `"primary" \| "secondary" \| "brand" \| "brandExtra" \| "success" \| "warning" \| "alert" \| "neutral"` | `"alert"` | Colour tone |
29
+ | `size` | `"xl" \| "lg" \| "md" \| "sm" \| "xs"` | `"md"` | Badge size; `"sm"` and `"xs"` render as dot-only |
30
+ | `icon` | `ReactNode` | — | Icon rendered inside the badge (not available at `"sm"`/`"xs"`) |
31
+ | `showStroke` | `boolean` | `false` | Adds a 1px border to separate the badge from its background |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-badge",
3
- "version": "0.96.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.96.0",
18
- "@xsolla/xui-primitives-core": "0.96.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",