File tree 2 files changed +8
-4
lines changed
packages/react-native/Libraries
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -362,14 +362,18 @@ const styles = StyleSheet.create({
362
362
} ,
363
363
} ) ;
364
364
365
+ type ModalRefProps = $ReadOnly < {
366
+ ref ?: React . RefSetter < PublicModalInstance > ,
367
+ } > ;
368
+
365
369
// NOTE: This wrapper component is necessary because `Modal` is a class
366
370
// component and we need to map `ref` to a differently named prop. This can be
367
371
// removed when `Modal` is a functional component.
368
372
function Wrapper ( {
369
373
ref,
370
374
...props
371
375
} : {
372
- ref ?: React . RefSetter < PublicModalInstance > ,
376
+ ... ModalRefProps ,
373
377
...ModalProps ,
374
378
} ) : React . Node {
375
379
return < Modal { ...props } modalRef = { ref } /> ;
Original file line number Diff line number Diff line change @@ -5985,10 +5985,10 @@ export type ModalProps = {
5985
5985
...ModalPropsAndroid,
5986
5986
...ViewProps,
5987
5987
};
5988
- declare function Wrapper( {
5988
+ type ModalRefProps = $ReadOnly< {
5989
5989
ref?: React.RefSetter<PublicModalInstance>,
5990
- ...ModalProps,
5991
- }): React.Node;
5990
+ }>;
5991
+ declare function Wrapper({ ...ModalRefProps, ...ModalProps }): React.Node;
5992
5992
declare export default typeof Wrapper;
5993
5993
"
5994
5994
`;
You can’t perform that action at this time.
0 commit comments