react-native-modalfy
Version:
Modal citizen of React Native
23 lines (22 loc) • 1.78 kB
TypeScript
import type { ComponentType } from 'react';
import type { ModalOptions } from '../types';
export default function <P>(modalName: Exclude<keyof P, symbol | number>, modalComponent: ComponentType<any> | ModalOptions): {
component: ComponentType<any> | ModalOptions;
name: Exclude<keyof P, number | symbol>;
options: {
animateInConfig?: Pick<import("react-native").Animated.TimingAnimationConfig, "duration" | "easing"> | undefined;
animationIn?: ((animatedValue: import("react-native").Animated.Value, toValue: number, callback?: (() => void) | undefined) => void | import("react-native").Animated.CompositeAnimation) | undefined;
animateOutConfig?: Pick<import("react-native").Animated.TimingAnimationConfig, "duration" | "easing"> | undefined;
animationOut?: ((animatedValue: import("react-native").Animated.Value, toValue: number, callback?: (() => void) | undefined) => void | import("react-native").Animated.CompositeAnimation) | undefined;
backBehavior?: "clear" | "pop" | "none" | undefined;
backdropColor?: import("react-native").ColorValue | undefined;
backdropOpacity?: number | undefined;
backdropAnimationDuration?: number | undefined;
containerStyle?: import("react-native").ViewStyle | undefined;
disableFlingGesture?: boolean | undefined;
position?: "center" | "top" | "bottom" | undefined;
stackContainerStyle?: import("react-native").ViewStyle | ((opacity: import("react-native").Animated.Value) => import("react-native").ViewStyle) | undefined;
transitionOptions?: import("../types").ModalTransitionOptions | undefined;
pointerEventsBehavior?: "none" | "auto" | "current-modal-only" | "current-modal-none" | undefined;
} | undefined;
};