UNPKG

@unep-wcmc/icca-mapeo-mobile-intro-screens

Version:

Intro screens for Mapeo Mobile for the WCMC ICCA registration app

38 lines (37 loc) 1.36 kB
import * as React from 'react'; import { ImageSourcePropType } from 'react-native'; import { SpringConfig } from 'react-native-redash'; import Animated from 'react-native-reanimated'; interface ScreenBase { backgroundColor: string; title: string; description: string; moreLink?: string; moreText?: string; moreTitle?: string; } interface ScreenWithAnimation extends ScreenBase { animation: any; } interface ScreenWithImage extends ScreenBase { image: ImageSourcePropType; } export declare type ScreenType = ScreenBase | ScreenWithAnimation | ScreenWithImage; export declare type OnShowInfo = (opts: { title: string; text: string; }) => void; /** * This helper will spring transition a value *from* zero, but returns a value * back to zero without any transition. Based on: * https://github.com/wcandillon/react-native-redash/blob/1eb308e254e6ee0061887312f7f1b0669030bd83/src/Transitions.ts#L57-L90 */ export declare const withSpringTransitionRight: (value: Animated.Node<number>, springConfig?: SpringConfig) => Animated.Node<number>; declare const _default: React.MemoExoticComponent<({ position, screen, screenCount, index, onShowInfo, }: { position: Animated.Node<number>; screen: ScreenType; screenCount: number; index: number; onShowInfo: OnShowInfo; }) => JSX.Element>; export default _default;