mirror of
https://github.com/zhigang1992/react-native-keyboard-manager.git
synced 2026-01-12 22:50:32 +08:00
README.md
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
Sample
|
||||
__tests__
|
||||
screenshots
|
||||
index.ios.js
|
||||
@@ -23,10 +23,16 @@ Soon...
|
||||
|
||||
## Install
|
||||
|
||||
1. Install dependency package
|
||||
```bash
|
||||
npm i -S react-native-keyboard-manager
|
||||
```
|
||||
|
||||
2. Link the native project
|
||||
```bash
|
||||
react-native link react-native-keyboard-manager
|
||||
```
|
||||
|
||||
## 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).
|
||||
|
||||
@@ -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.setShouldResignOnTouchOutside(true);
|
||||
|
||||
class Demo extends Component {
|
||||
class Sample extends Component {
|
||||
|
||||
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 {
|
||||
NativeModules, DeviceEventEmitter
|
||||
NativeModules, DeviceEventEmitter
|
||||
} from 'react-native';
|
||||
|
||||
const KeyboardManager = NativeModules.ReactNativeKeyboardManager;
|
||||
|
||||
console.log("ReactNativeKeyboardManager module");
|
||||
console.log(KeyboardManager);
|
||||
|
||||
module.exports = KeyboardManager;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user