1
1
import React , { Component } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
- import { Keyboard , Colors , Constants } from 'react-native-ui-lib' ;
3
+ import { Keyboard , Colors } from 'react-native-ui-lib' ;
4
4
const KeyboardRegistry = Keyboard . KeyboardRegistry ;
5
5
import KeyboardView from './KeyboardView' ;
6
6
@@ -17,13 +17,7 @@ class KeyboardView1 extends Component {
17
17
18
18
render ( ) {
19
19
const { title} = this . props ;
20
- return (
21
- < KeyboardView
22
- title = { title }
23
- backgroundColor = { Colors . violet10 }
24
- onPress = { this . onButtonPress }
25
- />
26
- ) ;
20
+ return < KeyboardView title = { title } backgroundColor = { Colors . violet10 } onPress = { this . onButtonPress } /> ;
27
21
}
28
22
}
29
23
@@ -33,24 +27,14 @@ class KeyboardView2 extends Component {
33
27
} ;
34
28
35
29
onButtonPress ( ) {
36
- if ( Constants . isIOS ) {
37
- KeyboardRegistry . toggleExpandedKeyboard ( 'KeyboardView2' ) ;
38
- } else {
39
- KeyboardRegistry . onItemSelected ( 'KeyboardView2' , {
40
- message : 'Item selected from keyboard 2'
41
- } ) ;
42
- }
30
+ KeyboardRegistry . onItemSelected ( 'KeyboardView2' , {
31
+ message : 'Item selected from keyboard 2'
32
+ } ) ;
43
33
}
44
34
45
35
render ( ) {
46
36
const { title} = this . props ;
47
- return (
48
- < KeyboardView
49
- title = { title }
50
- backgroundColor = { Colors . yellow20 }
51
- onPress = { this . onButtonPress }
52
- />
53
- ) ;
37
+ return < KeyboardView title = { title } backgroundColor = { Colors . yellow20 } onPress = { this . onButtonPress } /> ;
54
38
}
55
39
}
56
40
0 commit comments