2017-04-14 12:28:48 -05:00
|
|
|
// @flow
|
|
|
|
|
import React from 'react';
|
2017-04-14 21:47:54 -05:00
|
|
|
import { Text, View, TouchableOpacity } from 'react-native';
|
2017-04-14 12:28:48 -05:00
|
|
|
import { pure } from 'recompose';
|
|
|
|
|
import { Icon } from 'react-native-material-ui';
|
|
|
|
|
|
2017-07-23 19:58:10 -05:00
|
|
|
type Props = { glyph: string, text: string, route: string, onPress: Function, color?: string };
|
2017-04-14 21:47:54 -05:00
|
|
|
|
2017-07-23 19:58:10 -05:00
|
|
|
export default pure(({ glyph, text, color = 'grey', ...others }: Props) =>
|
2017-04-20 08:32:57 -05:00
|
|
|
<TouchableOpacity {...others}>
|
|
|
|
|
<View style={{ flexDirection: 'row', marginTop: 5 }}>
|
2017-07-23 19:58:10 -05:00
|
|
|
<Icon name={glyph} size={35} color={color} style={{ marginRight: 10 }} />
|
|
|
|
|
<Text style={{ lineHeight: 26 }}>
|
|
|
|
|
{text}
|
|
|
|
|
</Text>
|
2017-04-20 08:32:57 -05:00
|
|
|
</View>
|
|
|
|
|
</TouchableOpacity>
|
2017-07-23 19:58:10 -05:00
|
|
|
);
|