File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ export interface ModalBaseProps {
5050 * Defaults to `white` if not provided and transparent is `false`. Ignored if `transparent` is `true`.
5151 */
5252 backdropColor ?: ColorValue | undefined ;
53+
54+ /**
55+ * A ref to the native Modal component.
56+ */
57+ modalRef ?: React . RefObject < Modal | null > | undefined ;
5358}
5459
5560export interface ModalPropsIOS {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ import {
4646 FocusEvent ,
4747 GestureResponderEvent ,
4848 HostComponent ,
49+ HostInstance ,
4950 I18nManager ,
5051 Image ,
5152 ImageBackground ,
@@ -1540,6 +1541,10 @@ const KeyboardAvoidingViewTest = () => <KeyboardAvoidingView enabled />;
15401541
15411542const ModalTest = ( ) => < Modal hardwareAccelerated /> ;
15421543const ModalTest2 = ( ) => < Modal hardwareAccelerated testID = "modal-test-2" /> ;
1544+ const ModalRefTest = ( ) => {
1545+ const modalRef = React . useRef < Modal & HostInstance > ( null ) ;
1546+ return < Modal modalRef = { modalRef } /> ;
1547+ } ;
15431548
15441549// $ExpectType HostComponent<{ nativeProp: string; }>
15451550const NativeBridgedComponent = requireNativeComponent < { nativeProp : string } > (
You can’t perform that action at this time.
0 commit comments