mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 04:24:56 -06:00
18 lines
611 B
JavaScript
18 lines
611 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 };
|
|
|
|
export default pure(({ glyph, text, color = 'grey', ...others }: Props) =>
|
|
<TouchableOpacity {...others}>
|
|
<View style={{ flexDirection: 'row', marginTop: 5 }}>
|
|
<Icon name={glyph} size={35} color={color} style={{ marginRight: 10 }} />
|
|
<Text style={{ lineHeight: 26 }}>
|
|
{text}
|
|
</Text>
|
|
</View>
|
|
</TouchableOpacity>
|
|
);
|