mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 09:44:55 -06:00
25 lines
701 B
JavaScript
25 lines
701 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { Text, View, TouchableOpacity } from 'react-native';
|
|
import { pure } from 'recompose';
|
|
import { Icon } from 'react-native-material-ui';
|
|
|
|
type Props = {
|
|
glyph: string,
|
|
text: string,
|
|
route: string,
|
|
onPress: Function,
|
|
color?: string,
|
|
textStyle?: Object,
|
|
};
|
|
|
|
export default pure(({ glyph, text, color = 'grey', textStyle, ...others }: Props) => (
|
|
<TouchableOpacity {...others}>
|
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
<Icon name={glyph} size={28} color={color} style={{ margin: 5, marginRight: 10 }} />
|
|
<Text numberOfLines={2} ellipsizeMode="tail" style={textStyle}>
|
|
{text}
|
|
</Text>
|
|
</View>
|
|
</TouchableOpacity>
|
|
));
|