Fixed ios icons white on white header + removed unused imports

This commit is contained in:
keplyx 2019-08-05 14:05:51 +02:00
parent fbe687ca98
commit 2b7270bd06
3 changed files with 20 additions and 31 deletions

View file

@ -2,9 +2,11 @@
import * as React from "react";
import {Body, Header, Icon, Left, Right, Title} from "native-base";
import {StyleSheet} from "react-native";
import {StyleSheet, Platform} from "react-native";
import {getStatusBarHeight} from "react-native-status-bar-height";
import Touchable from 'react-native-platform-touchable';
import ThemeManager from "../utils/ThemeManager";
import CustomMaterialIcon from "./CustomMaterialIcon";
type Props = {
backButton: boolean,
@ -37,20 +39,18 @@ export default class CustomHeader extends React.Component<Props> {
<Touchable
style={{padding: 6}}
onPress={() => this.props.navigation.goBack()}>
<Icon
style={{color: "#fff"}}
name="arrow-left"
type={'MaterialCommunityIcons'}/>
<CustomMaterialIcon
color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
icon="arrow-left"/>
</Touchable>;
else
button =
<Touchable
style={{padding: 6}}
onPress={() => this.props.navigation.toggleDrawer()}>
<Icon
style={{color: "#fff"}}
name="menu"
type={'MaterialCommunityIcons'}/>
<CustomMaterialIcon
color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
icon="menu"/>
</Touchable>;
return (

View file

@ -15,22 +15,14 @@
"expo-localization": "^5.0.1",
"expo-permissions": "^5.0.1",
"i18n-js": "^3.3.0",
"i18next": "^17.0.4",
"native-base": "^2.12.1",
"native-base-shoutem-theme": "^0.2.3",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-i18next": "latest",
"react-native": "^0.59.9",
"react-native-autolink": "^1.8.1",
"react-native-hyperlink": "0.0.14",
"react-native-image-zoom-viewer": "^2.2.26",
"react-native-lightbox": "^0.8.0",
"react-native-modal": "^11.3.0",
"react-native-platform-touchable": "^1.1.1",
"react-native-scalable-image": "^0.5.1",
"react-native-status-bar-height": "^2.3.1",
"react-native-web": "^0.11.4",
"react-navigation": "^3.11.0"
},
"devDependencies": {

View file

@ -1,12 +1,14 @@
// @flow
import * as React from 'react';
import {Container, Text, Content, ListItem, Left, Thumbnail, Right, Body, Icon} from 'native-base';
import {Container, Text, Content, ListItem, Left, Thumbnail, Right, Body} from 'native-base';
import CustomHeader from "../../components/CustomHeader";
import {FlatList} from "react-native";
import {FlatList, Platform} from "react-native";
import Touchable from 'react-native-platform-touchable';
import Menu, {MenuItem} from 'react-native-material-menu';
import i18n from "i18n-js";
import CustomMaterialIcon from "../../components/CustomMaterialIcon";
import ThemeManager from "../../utils/ThemeManager";
const sortMode = {
price: "0",
@ -138,15 +140,11 @@ export default class ProximoListScreen extends React.Component<Props, State> {
*/
setupSortIcons(mode: string, isReverse: boolean) {
const downSortIcon =
<Icon
active
name={'sort-descending'}
type={'MaterialCommunityIcons'}/>;
<CustomMaterialIcon
icon={'sort-descending'}/>;
const upSortIcon =
<Icon
active
name={'sort-ascending'}
type={'MaterialCommunityIcons'}/>;
<CustomMaterialIcon
icon={'sort-ascending'}/>;
switch (mode) {
case sortMode.price:
this.setState({sortNameIcon: ''});
@ -183,10 +181,9 @@ export default class ProximoListScreen extends React.Component<Props, State> {
onPress={() =>
this._menu.show()
}>
<Icon
style={{color: "#fff"}}
name="sort"
type={'MaterialCommunityIcons'}/>
<CustomMaterialIcon
color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
icon={'sort'}/>
</Touchable>
}
>