mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-27 03:14:56 +03:00
Changed side menu icons with us component
This commit is contained in:
parent
e70acb681f
commit
4e5a553d89
@ -31,7 +31,7 @@ class IconView extends Component {
|
||||
};
|
||||
|
||||
_getIcon = () => {
|
||||
const { iconType } = this.props;
|
||||
const { iconType, children } = this.props;
|
||||
const name = this._getIconName();
|
||||
|
||||
switch (iconType) {
|
||||
@ -40,11 +40,11 @@ class IconView extends Component {
|
||||
case 'FontAwesome':
|
||||
return <FontAwesome {...this.props} />;
|
||||
case 'SimpleLineIcons':
|
||||
return <SimpleLineIcons {...this.props}>{this.props.children}</SimpleLineIcons>;
|
||||
return <SimpleLineIcons {...this.props}>{children}</SimpleLineIcons>;
|
||||
case 'MaterialCommunityIcons':
|
||||
return (
|
||||
<MaterialCommunityIcons name={name} {...this.props}>
|
||||
{this.props.children}
|
||||
{children}
|
||||
</MaterialCommunityIcons>
|
||||
);
|
||||
default:
|
||||
|
@ -9,6 +9,7 @@ import { NumericKeyboard } from './numericKeyboard';
|
||||
import { PinAnimatedInput } from './pinAnimatedInput';
|
||||
import { SideMenu } from './sideMenu';
|
||||
import Modal from './modal';
|
||||
import Icon from './icon';
|
||||
|
||||
export {
|
||||
Logo,
|
||||
@ -24,4 +25,5 @@ export {
|
||||
PinAnimatedInput,
|
||||
SideMenu,
|
||||
Modal,
|
||||
Icon,
|
||||
};
|
||||
|
@ -3,11 +3,10 @@ import { View, Text } from 'react-native';
|
||||
import {
|
||||
Thumbnail, List, ListItem, Container,
|
||||
} from 'native-base';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome';
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
|
||||
// Components
|
||||
import { IconButton } from '../..';
|
||||
import { Icon, IconButton } from '../..';
|
||||
|
||||
// Constants
|
||||
import { default as MENU } from '../../../constants/sideMenuItems';
|
||||
@ -129,7 +128,7 @@ class SideMenuView extends Component {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{item.icon && <Icon style={styles.listItemIcon} name={item.icon} />}
|
||||
{item.icon && <Icon iconType="FontAwesome" style={styles.listItemIcon} name={item.icon} />}
|
||||
{item.image && (
|
||||
<Thumbnail small style={styles.otherUserAvatar} source={item.image} />
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user