mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 03:13:52 +08:00
Spread TVViewProps into ViewProps instead of intersection
Reviewed By: yungsters Differential Revision: D7976556 fbshipit-source-id: ca2f6bcac249a937523c4b50add8960085a8be49
This commit is contained in:
committed by
Facebook Github Bot
parent
dbc9364b21
commit
bc658d3c44
@@ -71,7 +71,7 @@ const TVViewPropTypes = {
|
||||
tvParallaxMagnification: PropTypes.number,
|
||||
};
|
||||
|
||||
export type TVViewProps = {
|
||||
export type TVViewProps = $ReadOnly<{|
|
||||
isTVSelectable?: boolean,
|
||||
hasTVPreferredFocus?: boolean,
|
||||
tvParallaxProperties?: Object,
|
||||
@@ -79,6 +79,6 @@ export type TVViewProps = {
|
||||
tvParallaxShiftDistanceY?: number,
|
||||
tvParallaxTiltAngle?: number,
|
||||
tvParallaxMagnification?: number,
|
||||
};
|
||||
|}>;
|
||||
|
||||
module.exports = TVViewPropTypes;
|
||||
|
||||
@@ -35,9 +35,11 @@ const stylePropType = StyleSheetPropType(ViewStylePropTypes);
|
||||
export type ViewLayout = Layout;
|
||||
export type ViewLayoutEvent = LayoutEvent;
|
||||
|
||||
// There's no easy way to create a different type if (Platform.isTVOS):
|
||||
// so we must include TVViewProps
|
||||
export type ViewProps = {
|
||||
// There's no easy way to create a different type if (Platform.isTVOS):
|
||||
// so we must include TVViewProps
|
||||
...TVViewProps,
|
||||
|
||||
accessible?: boolean,
|
||||
accessibilityLabel?:
|
||||
| null
|
||||
@@ -77,7 +79,7 @@ export type ViewProps = {
|
||||
shouldRasterizeIOS?: boolean,
|
||||
collapsable?: boolean,
|
||||
needsOffscreenAlphaCompositing?: boolean,
|
||||
} & TVViewProps;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user