@spelyco/react-native 0.0.1-d6456420-alpha → 0.0.1-de2f9b91-alpha
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 +40 -24
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,58 +1,74 @@
|
|
|
1
1
|
# @spelyco/react-native
|
|
2
2
|
|
|
3
|
-
React Native UI components for Spelyco.
|
|
3
|
+
React Native UI components for Spelyco mobile projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
bun add @spelyco/react-native react-
|
|
10
|
+
bun add @spelyco/react-native @spelyco/react-lib react react-native
|
|
9
11
|
```
|
|
10
12
|
|
|
13
|
+
---
|
|
14
|
+
|
|
11
15
|
## Components
|
|
12
16
|
|
|
13
|
-
### Button
|
|
17
|
+
### `Button`
|
|
14
18
|
|
|
15
|
-
A
|
|
19
|
+
A basic button built on React Native's `Pressable`. Supports variants and sizes.
|
|
16
20
|
|
|
17
21
|
```tsx
|
|
18
22
|
import { Button } from "@spelyco/react-native";
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
// Default
|
|
25
|
+
<Button label="Tap me" />
|
|
26
|
+
|
|
27
|
+
// Variants
|
|
28
|
+
<Button label="Primary" variant="primary" />
|
|
21
29
|
<Button label="Secondary" variant="secondary" />
|
|
22
|
-
<Button label="Ghost" variant="ghost"
|
|
30
|
+
<Button label="Ghost" variant="ghost" />
|
|
31
|
+
|
|
32
|
+
// Sizes
|
|
33
|
+
<Button label="Small" size="sm" />
|
|
34
|
+
<Button label="Large" size="lg" />
|
|
35
|
+
|
|
36
|
+
// Disabled
|
|
23
37
|
<Button label="Disabled" disabled />
|
|
38
|
+
|
|
39
|
+
// With onPress
|
|
40
|
+
<Button label="Save" onPress={() => console.log("saved")} />
|
|
24
41
|
```
|
|
25
42
|
|
|
43
|
+
**Props:**
|
|
44
|
+
|
|
26
45
|
| Prop | Type | Default | Description |
|
|
27
|
-
|
|
28
|
-
| `label` | `string` |
|
|
46
|
+
| --- | --- | --- | --- |
|
|
47
|
+
| `label` | `string` | required | The button text |
|
|
29
48
|
| `variant` | `"primary" \| "secondary" \| "ghost"` | `"primary"` | Visual style |
|
|
30
49
|
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Padding size |
|
|
31
|
-
|
|
|
50
|
+
| `disabled` | `boolean` | `false` | Disable the button |
|
|
51
|
+
| `...rest` | `PressableProps` | — | Any React Native Pressable prop |
|
|
32
52
|
|
|
33
|
-
**Variants
|
|
53
|
+
**Variants:**
|
|
34
54
|
|
|
35
55
|
| Variant | Background |
|
|
36
|
-
|
|
37
|
-
| `primary` | `#6366f1`
|
|
38
|
-
| `secondary` | `#e5e7eb`
|
|
39
|
-
| `ghost` |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `primary` | Indigo (`#6366f1`) |
|
|
58
|
+
| `secondary` | Light gray (`#e5e7eb`) |
|
|
59
|
+
| `ghost` | Transparent |
|
|
40
60
|
|
|
41
|
-
|
|
61
|
+
---
|
|
42
62
|
|
|
43
|
-
|
|
44
|
-
|---|---|
|
|
45
|
-
| `sm` | `12×6` |
|
|
46
|
-
| `md` | `16×10` |
|
|
47
|
-
| `lg` | `24×14` |
|
|
48
|
-
|
|
49
|
-
## Peer Dependencies
|
|
63
|
+
## Peer dependencies
|
|
50
64
|
|
|
51
65
|
| Package | Version |
|
|
52
|
-
|
|
66
|
+
| --- | --- |
|
|
53
67
|
| `react` | `>=18` |
|
|
54
68
|
| `react-native` | `>=0.73` |
|
|
55
69
|
|
|
70
|
+
---
|
|
71
|
+
|
|
56
72
|
## License
|
|
57
73
|
|
|
58
74
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spelyco/react-native",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-de2f9b91-alpha",
|
|
4
4
|
"description": "React Native UI components for Spelyco",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react-native": ">=0.73"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@spelyco/react-lib": "
|
|
39
|
+
"@spelyco/react-lib": "1.2.0-beta"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@spelyco/tsconfig": "*",
|