Skip to content

Commit 0f76b0a

Browse files
committed
Merge branch 'master' into release
2 parents 8a1e467 + 0300fb3 commit 0f76b0a

File tree

8 files changed

+37
-15
lines changed

8 files changed

+37
-15
lines changed

.prettierrc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ UI Toolset & Components Library for React Native
1313
Read more in our [Wiki](https://github.com/wix/react-native-ui-lib/wiki). <br>
1414
Check out our [Docs](https://wix.github.io/react-native-ui-lib/). <br>
1515
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)

demo/src/screens/componentScreens/ButtonsScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
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",

src/components/button/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

src/components/dialog/dialogDeprecated.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const SWIPE_DIRECTIONS = {
2626
}; // DEFRECATED
2727

2828
class DialogDeprecated extends BaseComponent {
29-
static displayName = 'Dialog'
29+
static displayName = 'Dialog (deprecated)'
3030
static propTypes = {
3131
/**
3232
* Control visibility of the dialog

src/components/picker/NativePicker.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {WheelPicker} from '../../nativeComponents';
66
import PickerDialog from './PickerDialog';
77
import TouchableOpacity from '../touchableOpacity';
88
import View from '../view';
9+
import {Colors} from '../../style';
910

1011
class 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}

src/components/picker/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import * as PickerPresenter from './PickerPresenter';
1313
import NativePicker from './NativePicker';
1414
import PickerModal from './PickerModal';
1515
import PickerItem from './PickerItem';
16+
import {Colors} from '../../style';
1617

1718
const 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}

0 commit comments

Comments
 (0)