mirror of
https://github.com/zhigang1992/react-native-keyboard-manager.git
synced 2026-04-30 13:21:50 +08:00
README.md
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
Sample
|
Sample
|
||||||
|
__tests__
|
||||||
screenshots
|
screenshots
|
||||||
index.ios.js
|
index.ios.js
|
||||||
@@ -23,10 +23,16 @@ Soon...
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
1. Install dependency package
|
||||||
```bash
|
```bash
|
||||||
npm i -S react-native-keyboard-manager
|
npm i -S react-native-keyboard-manager
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2. Link the native project
|
||||||
|
```bash
|
||||||
|
react-native link react-native-keyboard-manager
|
||||||
|
```
|
||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
|
||||||
New features, bug fixes and improvements are welcome! For questions and suggestions use the [issues](https://github.com/douglasjunior/react-native-keyboard-manager/issues).
|
New features, bug fixes and improvements are welcome! For questions and suggestions use the [issues](https://github.com/douglasjunior/react-native-keyboard-manager/issues).
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import 'react-native';
|
|
||||||
import React from 'react';
|
|
||||||
import Index from '../index.android.js';
|
|
||||||
|
|
||||||
// Note: test renderer must be required after react-native.
|
|
||||||
import renderer from 'react-test-renderer';
|
|
||||||
|
|
||||||
it('renders correctly', () => {
|
|
||||||
const tree = renderer.create(
|
|
||||||
<Index />
|
|
||||||
);
|
|
||||||
});
|
|
||||||
@@ -44,7 +44,7 @@ KeyboardManager.setShouldShowTextFieldPlaceholder(true);
|
|||||||
KeyboardManager.setOverrideKeyboardAppearance(false);
|
KeyboardManager.setOverrideKeyboardAppearance(false);
|
||||||
KeyboardManager.setShouldResignOnTouchOutside(true);
|
KeyboardManager.setShouldResignOnTouchOutside(true);
|
||||||
|
|
||||||
class Demo extends Component {
|
class Sample extends Component {
|
||||||
|
|
||||||
state = {};
|
state = {};
|
||||||
|
|
||||||
@@ -104,4 +104,4 @@ class Demo extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AppRegistry.registerComponent('ReactNativeKeyboardManager', () => Demo);
|
AppRegistry.registerComponent('ReactNativeKeyboardManager', () => Sample);
|
||||||
5
index.js
5
index.js
@@ -23,14 +23,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
NativeModules, DeviceEventEmitter
|
NativeModules, DeviceEventEmitter
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
const KeyboardManager = NativeModules.ReactNativeKeyboardManager;
|
const KeyboardManager = NativeModules.ReactNativeKeyboardManager;
|
||||||
|
|
||||||
console.log("ReactNativeKeyboardManager module");
|
|
||||||
console.log(KeyboardManager);
|
|
||||||
|
|
||||||
module.exports = KeyboardManager;
|
module.exports = KeyboardManager;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user