26 lines
557 B
JavaScript
26 lines
557 B
JavaScript
import React from 'react';
|
|
import { View, Text, TouchableOpacity } from 'react-native';
|
|
|
|
const Item = ({ name, onClick }) => {
|
|
return (
|
|
<TouchableOpacity style={{
|
|
flex: 1,
|
|
flexDirection: 'row',
|
|
paddingTop: 5,
|
|
paddingBottom: 5,
|
|
paddingLeft: 10,
|
|
paddingRight: 10
|
|
}} onPress={() => { onClick() }}>
|
|
<View style={{
|
|
flex: 1,
|
|
flexDirection: 'column'
|
|
}}>
|
|
<Text style={{
|
|
fontSize: 20
|
|
}}>{name}</Text>
|
|
</View>
|
|
</TouchableOpacity>
|
|
)
|
|
}
|
|
|
|
export default Item; |