@xsolla/xui-radio-group 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 +34 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @xsolla/xui-radio-group
|
|
2
|
+
|
|
3
|
+
Context provider that groups radio buttons and manages their shared selection state.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-radio-group
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { RadioGroup } from '@xsolla/xui-radio-group';
|
|
15
|
+
import { Radio } from '@xsolla/xui-radio';
|
|
16
|
+
|
|
17
|
+
<RadioGroup value={selected} onChange={setSelected}>
|
|
18
|
+
<Radio value="option1" label="Option 1" />
|
|
19
|
+
<Radio value="option2" label="Option 2" />
|
|
20
|
+
</RadioGroup>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
### RadioGroup
|
|
26
|
+
|
|
27
|
+
| Prop | Type | Default | Description |
|
|
28
|
+
|------|------|---------|-------------|
|
|
29
|
+
| `value` | `string` | — | Controlled selected value |
|
|
30
|
+
| `onChange` | `(value: string) => void` | — | Callback when selection changes |
|
|
31
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Size passed to all child radio buttons |
|
|
32
|
+
| `disabled` | `boolean` | `false` | Disables all radio buttons in the group |
|
|
33
|
+
| `flexDirection` | `'row' \| 'column'` | `'column'` | Layout direction of the group |
|
|
34
|
+
| `gap` | `number` | `12` | Gap between radio buttons in pixels |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-radio-group",
|
|
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,9 +10,9 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-core": "0.
|
|
14
|
-
"@xsolla/xui-primitives-core": "0.
|
|
15
|
-
"@xsolla/xui-radio": "0.
|
|
13
|
+
"@xsolla/xui-core": "0.97.0",
|
|
14
|
+
"@xsolla/xui-primitives-core": "0.97.0",
|
|
15
|
+
"@xsolla/xui-radio": "0.97.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=16.8.0",
|