Files
devhub/patches/react-native-web+0.9.9.patch
2018-12-20 22:13:38 -02:00

58 lines
2.4 KiB
Diff

patch-package
--- a/node_modules/react-native-web/dist/exports/Text/TextStylePropTypes.js
+++ b/node_modules/react-native-web/dist/exports/Text/TextStylePropTypes.js
@@ -42,7 +42,9 @@ var TextStylePropTypes = Object.assign({}, ViewStylePropTypes, {
whiteSpace: string,
wordWrap: string,
MozOsxFontSmoothing: string,
- WebkitFontSmoothing: string
+ WebkitBoxOrient: oneOf(['vertical', 'horizontal']),
+ WebkitFontSmoothing: string,
+ WebkitLineClamp: oneOfType([string, number])
});
export default TextStylePropTypes;
\ No newline at end of file
--- a/node_modules/react-native-web/dist/exports/Text/index.js
+++ b/node_modules/react-native-web/dist/exports/Text/index.js
@@ -69,7 +69,7 @@ var Text = function (_Component) {
// allow browsers to automatically infer the language writing direction
otherProps.dir = dir !== undefined ? dir : 'auto';
- otherProps.style = [styles.initial, this.context.isInAParentText === true && styles.isInAParentText, style, selectable === false && styles.notSelectable, numberOfLines === 1 && styles.singleLineStyle, onPress && styles.pressable];
+ otherProps.style = [styles.initial, this.context.isInAParentText === true && styles.isInAParentText, style, selectable === false && styles.notSelectable, numberOfLines === 1 && styles.singleLineStyle, numberOfLines > 1 && styles.multiLineStyle, numberOfLines > 1 && { WebkitLineClamp: numberOfLines }, onPress && styles.pressable];
var component = isInAParentText ? 'span' : 'div';
@@ -139,6 +139,13 @@ var styles = StyleSheet.create({
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
+ },
+ multiLineStyle: {
+ display: '-webkit-box',
+ maxWidth: '100%',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ WebkitBoxOrient: 'vertical'
}
});
--- a/node_modules/react-native-web/dist/modules/ScrollResponder/index.js
+++ b/node_modules/react-native-web/dist/modules/ScrollResponder/index.js
@@ -355,9 +355,11 @@ var ScrollResponderMixin = {
animated = _ref.animated;
}
var node = this.scrollResponderGetScrollableNode();
- UIManager.updateView(node, { style: { scrollBehavior: !animated ? 'auto' : 'smooth' } }, this);
- node.scrollLeft = x || 0;
- node.scrollTop = y || 0;
+ node.scroll({
+ top: y || 0,
+ left: x || 0,
+ behavior: !animated ? 'auto' : 'smooth',
+ })
},
/**