Browse Source

Fixed ios icons white on white header + removed unused imports

keplyx 4 years ago
parent
commit
2b7270bd06
3 changed files with 20 additions and 31 deletions
  1. 9
    9
      components/CustomHeader.js
  2. 0
    8
      package.json
  3. 11
    14
      screens/Proximo/ProximoListScreen.js

+ 9
- 9
components/CustomHeader.js View File

@@ -2,9 +2,11 @@
2 2
 
3 3
 import * as React from "react";
4 4
 import {Body, Header, Icon, Left, Right, Title} from "native-base";
5
-import {StyleSheet} from "react-native";
5
+import {StyleSheet, Platform} from "react-native";
6 6
 import {getStatusBarHeight} from "react-native-status-bar-height";
7 7
 import Touchable from 'react-native-platform-touchable';
8
+import ThemeManager from "../utils/ThemeManager";
9
+import CustomMaterialIcon from "./CustomMaterialIcon";
8 10
 
9 11
 type Props = {
10 12
     backButton: boolean,
@@ -37,20 +39,18 @@ export default class CustomHeader extends React.Component<Props> {
37 39
                 <Touchable
38 40
                     style={{padding: 6}}
39 41
                     onPress={() => this.props.navigation.goBack()}>
40
-                    <Icon
41
-                        style={{color: "#fff"}}
42
-                        name="arrow-left"
43
-                        type={'MaterialCommunityIcons'}/>
42
+                    <CustomMaterialIcon
43
+                        color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
44
+                        icon="arrow-left"/>
44 45
                 </Touchable>;
45 46
         else
46 47
             button =
47 48
                 <Touchable
48 49
                     style={{padding: 6}}
49 50
                     onPress={() => this.props.navigation.toggleDrawer()}>
50
-                    <Icon
51
-                        style={{color: "#fff"}}
52
-                        name="menu"
53
-                        type={'MaterialCommunityIcons'}/>
51
+                    <CustomMaterialIcon
52
+                        color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
53
+                        icon="menu"/>
54 54
                 </Touchable>;
55 55
 
56 56
         return (

+ 0
- 8
package.json View File

@@ -15,22 +15,14 @@
15 15
     "expo-localization": "^5.0.1",
16 16
     "expo-permissions": "^5.0.1",
17 17
     "i18n-js": "^3.3.0",
18
-    "i18next": "^17.0.4",
19 18
     "native-base": "^2.12.1",
20 19
     "native-base-shoutem-theme": "^0.2.3",
21 20
     "react": "^16.8.6",
22 21
     "react-dom": "^16.8.6",
23
-    "react-i18next": "latest",
24 22
     "react-native": "^0.59.9",
25 23
     "react-native-autolink": "^1.8.1",
26
-    "react-native-hyperlink": "0.0.14",
27
-    "react-native-image-zoom-viewer": "^2.2.26",
28
-    "react-native-lightbox": "^0.8.0",
29
-    "react-native-modal": "^11.3.0",
30 24
     "react-native-platform-touchable": "^1.1.1",
31
-    "react-native-scalable-image": "^0.5.1",
32 25
     "react-native-status-bar-height": "^2.3.1",
33
-    "react-native-web": "^0.11.4",
34 26
     "react-navigation": "^3.11.0"
35 27
   },
36 28
   "devDependencies": {

+ 11
- 14
screens/Proximo/ProximoListScreen.js View File

@@ -1,12 +1,14 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import {Container, Text, Content, ListItem, Left, Thumbnail, Right, Body, Icon} from 'native-base';
4
+import {Container, Text, Content, ListItem, Left, Thumbnail, Right, Body} from 'native-base';
5 5
 import CustomHeader from "../../components/CustomHeader";
6
-import {FlatList} from "react-native";
6
+import {FlatList, Platform} from "react-native";
7 7
 import Touchable from 'react-native-platform-touchable';
8 8
 import Menu, {MenuItem} from 'react-native-material-menu';
9 9
 import i18n from "i18n-js";
10
+import CustomMaterialIcon from "../../components/CustomMaterialIcon";
11
+import ThemeManager from "../../utils/ThemeManager";
10 12
 
11 13
 const sortMode = {
12 14
     price: "0",
@@ -138,15 +140,11 @@ export default class ProximoListScreen extends React.Component<Props, State> {
138 140
      */
139 141
     setupSortIcons(mode: string, isReverse: boolean) {
140 142
         const downSortIcon =
141
-            <Icon
142
-                active
143
-                name={'sort-descending'}
144
-                type={'MaterialCommunityIcons'}/>;
143
+            <CustomMaterialIcon
144
+                icon={'sort-descending'}/>;
145 145
         const upSortIcon =
146
-            <Icon
147
-                active
148
-                name={'sort-ascending'}
149
-                type={'MaterialCommunityIcons'}/>;
146
+            <CustomMaterialIcon
147
+                icon={'sort-ascending'}/>;
150 148
         switch (mode) {
151 149
             case sortMode.price:
152 150
                 this.setState({sortNameIcon: ''});
@@ -183,10 +181,9 @@ export default class ProximoListScreen extends React.Component<Props, State> {
183 181
                                     onPress={() =>
184 182
                                         this._menu.show()
185 183
                                     }>
186
-                                    <Icon
187
-                                        style={{color: "#fff"}}
188
-                                        name="sort"
189
-                                        type={'MaterialCommunityIcons'}/>
184
+                                    <CustomMaterialIcon
185
+                                        color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
186
+                                        icon={'sort'}/>
190 187
                                 </Touchable>
191 188
                             }
192 189
                         >

Loading…
Cancel
Save