UNPKG

react-native-app-notification

Version:
52 lines (51 loc) 1.55 kB
import { FunctionComponent } from 'react'; import { ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native'; export declare type ShowNotificationOptions = { duration?: number; topOffset?: number; bottomOffset?: number; alignBottom?: number; id?: string; }; export declare type AppNotificationStyleProps = { containerStyle?: StyleProp<ViewStyle>; titleStyle?: StyleProp<TextStyle>; messageStyle?: StyleProp<TextStyle>; imageStyle?: StyleProp<ImageStyle>; }; export declare type AnimationWrapperConfig = { in?: FunctionComponent; out?: FunctionComponent; }; export declare type AppNotificationComponentProps = { contentContainerStyle?: StyleProp<ViewStyle>; topOffset?: number; bottomOffset?: number; alignBottom?: boolean; animated?: boolean; panEnabled?: boolean; duration?: number; maxAmount?: number; id?: string; animationWrappers?: AnimationWrapperConfig; renderNotification?: (props: RenderNotificationProps) => JSX.Element; } & AppNotificationStyleProps; export declare type NotificationOptions = { title?: string; message: string; imageUrl?: string; onPress?: () => void; animated?: boolean; panEnabled?: boolean; styles?: AppNotificationStyleProps; data?: any; left?: JSX.Element; right?: JSX.Element; }; export declare type RenderNotificationProps = NotificationOptions & { close(): void; }; export declare type NotificationQueueItem = NotificationOptions & { animateOut: boolean; id: string; };