@xsolla/xui-primitives-core 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 +29 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @xsolla/xui-primitives-core
|
|
2
|
+
|
|
3
|
+
Shared TypeScript types for cross-platform primitive components in the XUI toolkit.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-primitives-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import type { BoxProps, TextProps, InputPrimitiveProps } from '@xsolla/xui-primitives-core';
|
|
15
|
+
|
|
16
|
+
interface MyBoxProps extends BoxProps {
|
|
17
|
+
highlight?: boolean;
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Exports
|
|
22
|
+
|
|
23
|
+
- `BoxProps` — Props interface for layout container primitives (flexbox, spacing, borders, events, ARIA)
|
|
24
|
+
- `TextProps` — Props interface for text primitives (colour, fontSize, fontWeight, alignment)
|
|
25
|
+
- `SpinnerProps` — Props interface for loading spinner primitives
|
|
26
|
+
- `IconProps` — Props interface for icon primitives (name, colour, size)
|
|
27
|
+
- `DividerProps` — Props interface for divider/separator primitives
|
|
28
|
+
- `InputPrimitiveProps` — Props interface for text input primitives (value, onChange, inputMode, autoComplete, ARIA)
|
|
29
|
+
- `TextAreaPrimitiveProps` — Props interface for textarea primitives; extends `InputPrimitiveProps` with `rows` and `autoSize`
|