mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Set optional ref on View and split View Props (#49725)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49725 Changelog: [Internal] - Set optional ref on View and split View Props Reviewed By: huntie Differential Revision: D70327820 fbshipit-source-id: 2021125b0aff1497df50c2be73c2ecfc7e8f1157
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d0a101fbea
commit
8919fc3243
+1
-1
@@ -24,7 +24,7 @@ export type Props = ViewProps;
|
||||
* @see https://reactnative.dev/docs/view
|
||||
*/
|
||||
const View: component(
|
||||
ref: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
|
||||
ref?: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
|
||||
...props: ViewProps
|
||||
) = React.forwardRef(
|
||||
(
|
||||
|
||||
@@ -356,17 +356,7 @@ export type ViewPropsIOS = $ReadOnly<{
|
||||
shouldRasterizeIOS?: ?boolean,
|
||||
}>;
|
||||
|
||||
export type ViewProps = $ReadOnly<{
|
||||
...DirectEventProps,
|
||||
...GestureResponderHandlers,
|
||||
...MouseEventProps,
|
||||
...PointerEventProps,
|
||||
...FocusEventProps,
|
||||
...TouchEventProps,
|
||||
...ViewPropsAndroid,
|
||||
...ViewPropsIOS,
|
||||
...AccessibilityProps,
|
||||
|
||||
type ViewBaseProps = $ReadOnly<{
|
||||
children?: Node,
|
||||
style?: ?ViewStyleProp,
|
||||
|
||||
@@ -454,3 +444,16 @@ export type ViewProps = $ReadOnly<{
|
||||
*/
|
||||
removeClippedSubviews?: ?boolean,
|
||||
}>;
|
||||
|
||||
export type ViewProps = $ReadOnly<{
|
||||
...DirectEventProps,
|
||||
...GestureResponderHandlers,
|
||||
...MouseEventProps,
|
||||
...PointerEventProps,
|
||||
...FocusEventProps,
|
||||
...TouchEventProps,
|
||||
...ViewPropsAndroid,
|
||||
...ViewPropsIOS,
|
||||
...AccessibilityProps,
|
||||
...ViewBaseProps,
|
||||
}>;
|
||||
|
||||
@@ -3633,7 +3633,7 @@ declare export default typeof ReactNativeViewAttributes;
|
||||
exports[`public API should not change unintentionally Libraries/Components/View/View.js 1`] = `
|
||||
"export type Props = ViewProps;
|
||||
declare const View: component(
|
||||
ref: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
|
||||
ref?: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
|
||||
...props: ViewProps
|
||||
);
|
||||
declare export default typeof View;
|
||||
@@ -3927,16 +3927,7 @@ export type ViewPropsAndroid = $ReadOnly<{
|
||||
export type ViewPropsIOS = $ReadOnly<{
|
||||
shouldRasterizeIOS?: ?boolean,
|
||||
}>;
|
||||
export type ViewProps = $ReadOnly<{
|
||||
...DirectEventProps,
|
||||
...GestureResponderHandlers,
|
||||
...MouseEventProps,
|
||||
...PointerEventProps,
|
||||
...FocusEventProps,
|
||||
...TouchEventProps,
|
||||
...ViewPropsAndroid,
|
||||
...ViewPropsIOS,
|
||||
...AccessibilityProps,
|
||||
type ViewBaseProps = $ReadOnly<{
|
||||
children?: Node,
|
||||
style?: ?ViewStyleProp,
|
||||
collapsable?: ?boolean,
|
||||
@@ -3949,6 +3940,18 @@ export type ViewProps = $ReadOnly<{
|
||||
pointerEvents?: ?(\\"auto\\" | \\"box-none\\" | \\"box-only\\" | \\"none\\"),
|
||||
removeClippedSubviews?: ?boolean,
|
||||
}>;
|
||||
export type ViewProps = $ReadOnly<{
|
||||
...DirectEventProps,
|
||||
...GestureResponderHandlers,
|
||||
...MouseEventProps,
|
||||
...PointerEventProps,
|
||||
...FocusEventProps,
|
||||
...TouchEventProps,
|
||||
...ViewPropsAndroid,
|
||||
...ViewPropsIOS,
|
||||
...AccessibilityProps,
|
||||
...ViewBaseProps,
|
||||
}>;
|
||||
"
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user