mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 22:44:52 +00:00
@@ -29,6 +29,7 @@ const TextPropTypes = {
|
||||
accessible: bool,
|
||||
accessibilityState: object,
|
||||
children: any,
|
||||
forwardedRef: any,
|
||||
importantForAccessibility: oneOf(['auto', 'no', 'no-hide-descendants', 'yes']),
|
||||
maxFontSizeMultiplier: number,
|
||||
nativeID: string,
|
||||
|
||||
@@ -26,6 +26,7 @@ class Text extends React.Component<*> {
|
||||
renderText(hasTextAncestor) {
|
||||
const {
|
||||
dir,
|
||||
forwardedRef,
|
||||
numberOfLines,
|
||||
onPress,
|
||||
selectable,
|
||||
@@ -67,6 +68,7 @@ class Text extends React.Component<*> {
|
||||
];
|
||||
// allow browsers to automatically infer the language writing direction
|
||||
otherProps.dir = dir !== undefined ? dir : 'auto';
|
||||
otherProps.ref = forwardedRef;
|
||||
otherProps.style = [
|
||||
style,
|
||||
numberOfLines > 1 && { WebkitLineClamp: numberOfLines },
|
||||
|
||||
@@ -60,6 +60,7 @@ export type ViewProps = {
|
||||
accessible?: boolean,
|
||||
children?: any,
|
||||
className?: string,
|
||||
forwardedRef?: any,
|
||||
hitSlop?: EdgeInsetsProp,
|
||||
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants',
|
||||
nativeID?: string,
|
||||
@@ -117,6 +118,7 @@ const ViewPropTypes = {
|
||||
accessibilityState: object,
|
||||
accessible: bool,
|
||||
children: any,
|
||||
forwardedRef: any,
|
||||
hitSlop: EdgeInsetsPropType,
|
||||
importantForAccessibility: oneOf(['auto', 'no', 'no-hide-descendants', 'yes']),
|
||||
nativeID: string,
|
||||
|
||||
@@ -52,6 +52,7 @@ class View extends Component<ViewProps> {
|
||||
}
|
||||
|
||||
supportedProps.classList = [this.props.className, classes.view];
|
||||
supportedProps.ref = this.props.forwardedRef;
|
||||
supportedProps.style = StyleSheet.compose(
|
||||
hasTextAncestor && styles.inline,
|
||||
this.props.style
|
||||
|
||||
Reference in New Issue
Block a user