Browse Source

Fixed recursive import warning

Arnaud Vergnet 3 years ago
parent
commit
24106e9791
2 changed files with 3 additions and 2 deletions
  1. 1
    0
      src/components/Tabbar/CustomTabBar.js
  2. 2
    2
      src/components/Tabbar/TabHomeIcon.js

+ 1
- 0
src/components/Tabbar/CustomTabBar.js View File

@@ -137,6 +137,7 @@ class CustomTabBar extends React.Component<Props, State> {
137 137
                 onLongPress={onLongPress}
138 138
                 focused={isFocused}
139 139
                 key={route.key}
140
+                tabBarHeight={CustomTabBar.TAB_BAR_HEIGHT}
140 141
             />
141 142
     };
142 143
 

+ 2
- 2
src/components/Tabbar/TabHomeIcon.js View File

@@ -4,13 +4,13 @@ import * as React from 'react';
4 4
 import {Image, Platform, View} from "react-native";
5 5
 import {FAB, TouchableRipple, withTheme} from 'react-native-paper';
6 6
 import * as Animatable from "react-native-animatable";
7
-import CustomTabBar from "./CustomTabBar";
8 7
 
9 8
 type Props = {
10 9
     focused: boolean,
11 10
     onPress: Function,
12 11
     onLongPress: Function,
13 12
     theme: Object,
13
+    tabBarHeight: number,
14 14
 }
15 15
 
16 16
 const AnimatedFAB = Animatable.createAnimatableComponent(FAB);
@@ -81,7 +81,7 @@ class TabHomeIcon extends React.Component<Props> {
81 81
                         bottom: 0,
82 82
                         left: 0,
83 83
                         width: '100%',
84
-                        height: CustomTabBar.TAB_BAR_HEIGHT + 30,
84
+                        height: this.props.tabBarHeight + 30,
85 85
                         marginBottom: -15,
86 86
                     }}
87 87
                 >

Loading…
Cancel
Save