@react-solutions/inputs 0.1.3 → 0.1.4
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 +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# @react-solutions/
|
|
1
|
+
# @react-solutions/inputs
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@react-solutions/inputs)
|
|
6
|
+
[](https://www.npmjs.com/package/@react-solutions/inputs)
|
|
7
|
+
[](https://bundlephobia.com/package/@react-solutions/inputs)
|
|
8
8
|
|
|
9
9
|
</div>
|
|
10
10
|
Lightweight React form input components and react-hook-form wrappers.
|
|
@@ -19,7 +19,7 @@ Quick highlights:
|
|
|
19
19
|
Install the package and peer dependencies in the consuming app:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npm install @react-solutions/
|
|
22
|
+
npm install @react-solutions/inputs
|
|
23
23
|
# ensure peer deps exist in the host app:
|
|
24
24
|
npm install react react-dom @mui/material @emotion/react @emotion/styled react-hook-form date-fns
|
|
25
25
|
```
|
|
@@ -28,10 +28,10 @@ npm install react react-dom @mui/material @emotion/react @emotion/styled react-
|
|
|
28
28
|
|
|
29
29
|
1. controlled components (use with useState)
|
|
30
30
|
|
|
31
|
-
Example: `@react-solutions/
|
|
31
|
+
Example: `@react-solutions/inputs` demonstrates using components like `TextInputField` and `SelectInputField` with `value` / `onChange` props.
|
|
32
32
|
|
|
33
33
|
```tsx
|
|
34
|
-
import { TextInputField, SelectInputField } from "@react-solutions/
|
|
34
|
+
import { TextInputField, SelectInputField } from "@react-solutions/inputs";
|
|
35
35
|
// in component:
|
|
36
36
|
<TextInputField
|
|
37
37
|
name="name"
|
|
@@ -42,10 +42,10 @@ import { TextInputField, SelectInputField } from "@react-solutions/input";
|
|
|
42
42
|
|
|
43
43
|
2. react-hook-form wrappers (preferred when using react-hook-form)
|
|
44
44
|
|
|
45
|
-
Example: `@react-solutions/
|
|
45
|
+
Example: `@react-solutions/inputs` shows usage of `FormInputTextField`, `FormInputSelect`, etc.
|
|
46
46
|
|
|
47
47
|
```tsx
|
|
48
|
-
import { FormInputTextField, FormInputSelect } from "@react-solutions/
|
|
48
|
+
import { FormInputTextField, FormInputSelect } from "@react-solutions/inputs";
|
|
49
49
|
// inside a form using react-hook-form's control:
|
|
50
50
|
<FormInputTextField
|
|
51
51
|
name="email"
|