Browse Source

Fixed recursive import warning

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

Loading…
Cancel
Save