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 11{
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"
1111}
Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ UI Toolset & Components Library for React Native
1313Read more in our [ Wiki] ( https://github.com/wix/react-native-ui-lib/wiki ) . <br >
1414Check out our [ Docs] ( https://wix.github.io/react-native-ui-lib/ ) . <br >
1515Our [ 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 {
6565 return (
6666 < View useSafeArea >
6767 { ! ! snippet && < SnippetBlock snippet = { snippet } onClose = { ( ) => this . hideSnippet ( ) } /> }
68- < ScrollView >
68+ < ScrollView showsVerticalScrollIndicator = { false } >
6969 < View centerH >
7070 < Text style = { styles . title } > Buttons</ Text >
7171
Original file line number Diff line number Diff line change 7373 "jest" : " ^24.5.0" ,
7474 "metro-react-native-babel-preset" : " ^0.53.1" ,
7575 "mocha" : " ^5.0.0" ,
76+ "prettier-eslint" : " ^9.0.0" ,
7677 "react" : " 16.8.3" ,
7778 "react-autobind" : " ^1.0.6" ,
7879 "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 {
176176 }
177177 }
178178
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+
179194 // This method will be called more than once in case of layout change!
180195 onLayout = event => {
181196 const height = event . nativeEvent . layout . height ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const SWIPE_DIRECTIONS = {
2626} ; // DEFRECATED
2727
2828class DialogDeprecated extends BaseComponent {
29- static displayName = 'Dialog'
29+ static displayName = 'Dialog (deprecated) '
3030 static propTypes = {
3131 /**
3232 * Control visibility of the dialog
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import {WheelPicker} from '../../nativeComponents';
66import PickerDialog from './PickerDialog' ;
77import TouchableOpacity from '../touchableOpacity' ;
88import View from '../view' ;
9+ import { Colors } from '../../style' ;
910
1011class NativePicker extends BaseComponent {
1112 state = {
@@ -75,8 +76,6 @@ class NativePicker extends BaseComponent {
7576
7677 render ( ) {
7778 const { renderPicker, customPickerProps, testID} = this . props ;
78- const textInputProps = TextField . extractOwnProps ( this . props ) ;
79- const label = this . getLabel ( ) ;
8079
8180 if ( _ . isFunction ( renderPicker ) ) {
8281 const { selectedValue} = this . state ;
@@ -90,10 +89,12 @@ class NativePicker extends BaseComponent {
9089 ) ;
9190 }
9291
92+ const textInputProps = TextField . extractOwnProps ( this . props ) ;
93+ const label = this . getLabel ( ) ;
9394 return (
9495 < TextField
96+ color = { Colors . dark10 }
9597 { ...textInputProps }
96- enableErrors = { false }
9798 value = { label }
9899 expandable
99100 renderExpandable = { this . renderPickerDialog }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import * as PickerPresenter from './PickerPresenter';
1313import NativePicker from './NativePicker' ;
1414import PickerModal from './PickerModal' ;
1515import PickerItem from './PickerItem' ;
16+ import { Colors } from '../../style' ;
1617
1718const PICKER_MODES = {
1819 SINGLE : 'SINGLE' ,
@@ -324,9 +325,9 @@ class Picker extends BaseComponent {
324325 const label = this . getLabel ( ) ;
325326 return (
326327 < TextField
328+ color = { Colors . dark10 }
327329 { ...textInputProps }
328330 { ...this . getAccessibilityInfo ( ) }
329- enableErrors = { false }
330331 value = { label }
331332 expandable
332333 renderExpandable = { this . renderExpandableModal }
You can’t perform that action at this time.
0 commit comments