File tree Expand file tree Collapse file tree 8 files changed +37
-15
lines changed
demo/src/screens/componentScreens Expand file tree Collapse file tree 8 files changed +37
-15
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "eslintIntegration": true,
3
- "printWidth": 120,
4
- "useTabs": false,
5
- "semi": true,
6
- "singleQuote": true,
7
- "jsxSingleQuote": false,
8
- "trailingComma": "all ",
9
- "bracketSpacing": false,
10
- "arrowParens": "avoid"
2
+ // "eslintIntegration": true,
3
+ // "printWidth": 120,
4
+ // "useTabs": false,
5
+ // "semi": true,
6
+ // "singleQuote": true,
7
+ // "jsxSingleQuote": false,
8
+ // "trailingComma": "none ",
9
+ // "bracketSpacing": false,
10
+ // "arrowParens": "avoid"
11
11
}
Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ UI Toolset & Components Library for React Native
13
13
Read more in our [ Wiki] ( https://github.com/wix/react-native-ui-lib/wiki ) . <br >
14
14
Check out our [ Docs] ( https://wix.github.io/react-native-ui-lib/ ) . <br >
15
15
Our [ Discord Channel] ( https://discord.gg/2eW4g6Z )
16
+
17
+
18
+ ### RN60
19
+ please use ` react-native-ui-lib@rn61 ` for React Native >= 0.60.0 (till it will publish officially)
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export default class ButtonsScreen extends DemoScreen {
65
65
return (
66
66
< View useSafeArea >
67
67
{ ! ! snippet && < SnippetBlock snippet = { snippet } onClose = { ( ) => this . hideSnippet ( ) } /> }
68
- < ScrollView >
68
+ < ScrollView showsVerticalScrollIndicator = { false } >
69
69
< View centerH >
70
70
< Text style = { styles . title } > Buttons</ Text >
71
71
Original file line number Diff line number Diff line change 73
73
"jest" : " ^24.5.0" ,
74
74
"metro-react-native-babel-preset" : " ^0.53.1" ,
75
75
"mocha" : " ^5.0.0" ,
76
+ "prettier-eslint" : " ^9.0.0" ,
76
77
"react" : " 16.8.3" ,
77
78
"react-autobind" : " ^1.0.6" ,
78
79
"react-dom" : " ^15.4.2" ,
Original file line number Diff line number Diff line change @@ -176,6 +176,21 @@ export default class Button extends PureBaseComponent {
176
176
}
177
177
}
178
178
179
+ componentDidMount ( ) {
180
+ Constants . addDimensionsEventListener ( this . onOrientationChanged ) ;
181
+ }
182
+
183
+ componentWillUnmount ( ) {
184
+ Constants . removeDimensionsEventListener ( this . onOrientationChanged ) ;
185
+ }
186
+
187
+ onOrientationChanged = ( ) => {
188
+ if ( Constants . isTablet && this . props . fullWidth ) {
189
+ // only to trigger re-render
190
+ this . setState ( { isLandscape : Constants . isLandscape } ) ;
191
+ }
192
+ } ;
193
+
179
194
// This method will be called more than once in case of layout change!
180
195
onLayout = event => {
181
196
const height = event . nativeEvent . layout . height ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const SWIPE_DIRECTIONS = {
26
26
} ; // DEFRECATED
27
27
28
28
class DialogDeprecated extends BaseComponent {
29
- static displayName = 'Dialog'
29
+ static displayName = 'Dialog (deprecated) '
30
30
static propTypes = {
31
31
/**
32
32
* Control visibility of the dialog
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import {WheelPicker} from '../../nativeComponents';
6
6
import PickerDialog from './PickerDialog' ;
7
7
import TouchableOpacity from '../touchableOpacity' ;
8
8
import View from '../view' ;
9
+ import { Colors } from '../../style' ;
9
10
10
11
class NativePicker extends BaseComponent {
11
12
state = {
@@ -75,8 +76,6 @@ class NativePicker extends BaseComponent {
75
76
76
77
render ( ) {
77
78
const { renderPicker, customPickerProps, testID} = this . props ;
78
- const textInputProps = TextField . extractOwnProps ( this . props ) ;
79
- const label = this . getLabel ( ) ;
80
79
81
80
if ( _ . isFunction ( renderPicker ) ) {
82
81
const { selectedValue} = this . state ;
@@ -90,10 +89,12 @@ class NativePicker extends BaseComponent {
90
89
) ;
91
90
}
92
91
92
+ const textInputProps = TextField . extractOwnProps ( this . props ) ;
93
+ const label = this . getLabel ( ) ;
93
94
return (
94
95
< TextField
96
+ color = { Colors . dark10 }
95
97
{ ...textInputProps }
96
- enableErrors = { false }
97
98
value = { label }
98
99
expandable
99
100
renderExpandable = { this . renderPickerDialog }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import * as PickerPresenter from './PickerPresenter';
13
13
import NativePicker from './NativePicker' ;
14
14
import PickerModal from './PickerModal' ;
15
15
import PickerItem from './PickerItem' ;
16
+ import { Colors } from '../../style' ;
16
17
17
18
const PICKER_MODES = {
18
19
SINGLE : 'SINGLE' ,
@@ -324,9 +325,9 @@ class Picker extends BaseComponent {
324
325
const label = this . getLabel ( ) ;
325
326
return (
326
327
< TextField
328
+ color = { Colors . dark10 }
327
329
{ ...textInputProps }
328
330
{ ...this . getAccessibilityInfo ( ) }
329
- enableErrors = { false }
330
331
value = { label }
331
332
expandable
332
333
renderExpandable = { this . renderExpandableModal }
You can’t perform that action at this time.
0 commit comments