react-native-keyboard-controller 1.0.0-beta.0 → 1.0.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 +2 -50
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Keyboard manager which works in identical way on both iOS and Android.
|
|
4
4
|
|
|
5
|
-
> **Note**: This library is still in development and in `beta` stage. So most likely it has bugs/issues - don't hesitate to report if you find them 🙂.
|
|
6
|
-
|
|
7
5
|
## Demonstration
|
|
8
6
|
|
|
9
7
|
<img src="./gifs/demo.gif?raw=true" width="60%">
|
|
@@ -27,55 +25,9 @@ yarn add react-native-keyboard-controller
|
|
|
27
25
|
# npm install react-native-keyboard-controller --save
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
For more comprehensive usage you can have a look on [example](https://github.com/kirillzyusko/react-native-keyboard-controller/tree/main/example).
|
|
33
|
-
|
|
34
|
-
Below you can see a short overview of library API:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
import {
|
|
38
|
-
KeyboardProvider,
|
|
39
|
-
useKeyboardAnimation,
|
|
40
|
-
} from 'react-native-keyboard-controller';
|
|
28
|
+
## Documentation
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
<KeyboardProvider>
|
|
44
|
-
<AppContainer />
|
|
45
|
-
</KeyboardProvider>
|
|
46
|
-
|
|
47
|
-
// 2. get animation values where you need them
|
|
48
|
-
const { height, progress } = useKeyboardAnimation();
|
|
49
|
-
|
|
50
|
-
// 3. Animate any elements as you wish :)
|
|
51
|
-
<Animated.View
|
|
52
|
-
style={{
|
|
53
|
-
width: 50,
|
|
54
|
-
height: 50,
|
|
55
|
-
backgroundColor: 'red',
|
|
56
|
-
borderRadius: 25,
|
|
57
|
-
// the element will move up with the keyboard
|
|
58
|
-
transform: [{ translateY: height }],
|
|
59
|
-
}}
|
|
60
|
-
/>
|
|
61
|
-
<Animated.View
|
|
62
|
-
style={{
|
|
63
|
-
width: 50,
|
|
64
|
-
height: 50,
|
|
65
|
-
backgroundColor: 'green',
|
|
66
|
-
borderRadius: 25,
|
|
67
|
-
transform: [
|
|
68
|
-
{
|
|
69
|
-
// or use custom interpolation using `progress`
|
|
70
|
-
translateX: progress.interpolate({
|
|
71
|
-
inputRange: [0, 1],
|
|
72
|
-
outputRange: [0, 100],
|
|
73
|
-
}),
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
```
|
|
30
|
+
Check out our dedicated documentation page for info about this library, API reference and more: [https://kirillzyusko.github.io/react-native-keyboard-controller/](https://kirillzyusko.github.io/react-native-keyboard-controller/)
|
|
79
31
|
|
|
80
32
|
## Contributing
|
|
81
33
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-keyboard-controller",
|
|
3
|
-
"version": "1.0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Keyboard manager which works in identical way on both iOS and Android",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"test": "jest",
|
|
26
|
-
"typescript": "tsc --noEmit",
|
|
26
|
+
"typescript": "tsc --noEmit --project tsconfig.build.json",
|
|
27
27
|
"lint": "eslint --quiet \"**/*.{js,ts,tsx}\"",
|
|
28
28
|
"prepare": "bob build",
|
|
29
29
|
"release": "release-it",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"bugs": {
|
|
45
45
|
"url": "https://github.com/kirillzyusko/react-native-keyboard-controller/issues"
|
|
46
46
|
},
|
|
47
|
-
"homepage": "https://github.
|
|
47
|
+
"homepage": "https://kirillzyusko.github.io/react-native-keyboard-controller/",
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"registry": "https://registry.npmjs.org/"
|
|
50
50
|
},
|