Skip to content

Commit

Permalink
fixed size of ArrowLeft icon, using our own Add icon for nodes (like …
Browse files Browse the repository at this point in the history
…channels)
  • Loading branch information
myxmaster committed Nov 8, 2023
1 parent 341a112 commit 5fad66c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
3 changes: 3 additions & 0 deletions assets/images/SVG/Arrow_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions assets/images/SVG/Back.svg

This file was deleted.

13 changes: 9 additions & 4 deletions components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react';
import {
StyleProp,
TextStyle,
TouchableOpacity,
ViewStyle
ViewStyle,
TouchableOpacity
} from 'react-native';
import { Header, Icon, TextProps } from 'react-native-elements';
import { IconObject } from 'react-native-elements/dist/icons/Icon';

import { localeString } from '../utils/LocaleUtils';
import { themeColor } from '../utils/ThemeUtils';

import Back from '../assets/images/SVG/Back.svg';
import ArrowLeft from '../assets/images/SVG/Arrow_left.svg';

interface HeaderIcon extends IconObject {
icon?: string;
Expand Down Expand Up @@ -44,7 +44,12 @@ function ZeusHeader(props: HeaderProps) {
}}
accessibilityLabel={localeString('general.goBack')}
>
<Back stroke={themeColor('text')} />
<ArrowLeft
fill={themeColor('text')}
width="30"
height="30"
style={{ alignSelf: 'center' }}
/>
</TouchableOpacity>
);

Expand Down
19 changes: 12 additions & 7 deletions views/Settings/Nodes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { FlatList, View, Text } from 'react-native';
import { FlatList, View, Text, TouchableOpacity } from 'react-native';
import { Icon, ListItem } from 'react-native-elements';
import { inject, observer } from 'mobx-react';

Expand All @@ -16,6 +16,8 @@ import { localeString } from '../../utils/LocaleUtils';
import { themeColor } from '../../utils/ThemeUtils';
import ChannelsStore from '../../stores/ChannelsStore';

import Add from '../../assets/images/SVG/Add.svg';

interface NodesProps {
nodes: any[];
navigation: any;
Expand Down Expand Up @@ -112,20 +114,23 @@ export default class Nodes extends React.Component<NodesProps, NodesState> {
});

const AddButton = () => (
<Icon
name="add"
<TouchableOpacity
onPress={() =>
navigation.navigate('NodeConfiguration', {
newEntry: true,
index:
(nodes && nodes.length && Number(nodes.length)) || 0
})
}
color={themeColor('text')}
underlayColor="transparent"
size={30}
accessibilityLabel={localeString('general.add')}
/>
>
<Add
fill={themeColor('text')}
width="30"
height="30"
style={{ alignSelf: 'center' }}
/>
</TouchableOpacity>
);

return (
Expand Down

0 comments on commit 5fad66c

Please sign in to comment.