UNPKG

react-native-windows

Version:
50 lines (39 loc) 1.26 kB
/** * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * @flow strict-local * @format */ import type {Double, DirectEventHandler, Int32} from '../../Types/CodegenTypes'; import {codegenNativeComponent} from 'react-native'; import type {HostComponent} from '../../../src/private/types/HostComponent'; import type {ViewProps} from '../View/ViewPropTypes'; type DismissEvent = $ReadOnly<{| isOpen?: boolean, |}>; type NativeProps = $ReadOnly<{| ...ViewProps, isOpen?: boolean, /** * Configures the Popup with a transparent backdrop. */ isLightDismissEnabled?: boolean, /** * Sets whether the Popup will automatically receive focus when opened. * Defaults to true. Always true when isLightDismissEnabled === true. */ autoFocus?: boolean, horizontalOffset?: Double, verticalOffset?: Double, /** * Sets a React element to use as an anchor point. When set, the popup will be positioned relative to it. */ target?: Int32, onDismiss?: ?DirectEventHandler<DismissEvent>, testID?: string, |}>; type NativeType = HostComponent<NativeProps>; // $FlowFixMe[nonpolymorphic-type-arg] export default (codegenNativeComponent<NativeProps>('RCTPopup', { interfaceOnly: true, }): NativeType);