mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-25 01:28:16 +00:00
Stricter flow typing on CardStackStyleInterpolator
This commit is contained in:
parent
681e1c6e31
commit
bbd82dff53
@ -1,6 +1,6 @@
|
||||
/* @flow */
|
||||
|
||||
import { I18nManager } from 'react-native';
|
||||
import { I18nManager, type AnimatedViewStylePropTypes } from 'react-native';
|
||||
|
||||
import type { NavigationSceneRendererProps } from '../TypeDefinition';
|
||||
|
||||
@ -22,7 +22,9 @@ import type { NavigationSceneRendererProps } from '../TypeDefinition';
|
||||
/**
|
||||
* Render the initial style when the initial layout isn't measured yet.
|
||||
*/
|
||||
function forInitial(props: NavigationSceneRendererProps): Object {
|
||||
function forInitial(
|
||||
props: NavigationSceneRendererProps
|
||||
): AnimatedViewStylePropTypes {
|
||||
const { navigation, scene } = props;
|
||||
|
||||
const focused = navigation.state.index === scene.index;
|
||||
@ -38,7 +40,9 @@ function forInitial(props: NavigationSceneRendererProps): Object {
|
||||
/**
|
||||
* Standard iOS-style slide in from the right.
|
||||
*/
|
||||
function forHorizontal(props: NavigationSceneRendererProps): Object {
|
||||
function forHorizontal(
|
||||
props: NavigationSceneRendererProps
|
||||
): AnimatedViewStylePropTypes {
|
||||
const { layout, position, scene } = props;
|
||||
|
||||
if (!layout.isMeasured) {
|
||||
@ -81,7 +85,9 @@ function forHorizontal(props: NavigationSceneRendererProps): Object {
|
||||
/**
|
||||
* Standard iOS-style slide in from the bottom (used for modals).
|
||||
*/
|
||||
function forVertical(props: NavigationSceneRendererProps): Object {
|
||||
function forVertical(
|
||||
props: NavigationSceneRendererProps
|
||||
): AnimatedViewStylePropTypes {
|
||||
const { layout, position, scene } = props;
|
||||
|
||||
if (!layout.isMeasured) {
|
||||
@ -117,7 +123,9 @@ function forVertical(props: NavigationSceneRendererProps): Object {
|
||||
/**
|
||||
* Standard Android-style fade in from the bottom.
|
||||
*/
|
||||
function forFadeFromBottomAndroid(props: NavigationSceneRendererProps): Object {
|
||||
function forFadeFromBottomAndroid(
|
||||
props: NavigationSceneRendererProps
|
||||
): AnimatedViewStylePropTypes {
|
||||
const { layout, position, scene } = props;
|
||||
|
||||
if (!layout.isMeasured) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user