You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
760 B
35 lines
760 B
import React from "react";
|
|
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
|
|
import Icon from "./Icon";
|
|
import Text from "./Text";
|
|
|
|
function CategoryPickerItem({ item, onPress }) {
|
|
return (
|
|
<View style={styles.container}>
|
|
<TouchableOpacity onPress={onPress}>
|
|
<Icon
|
|
backgroundColor={item.backgroundColor}
|
|
name={item.icon}
|
|
size={120}
|
|
/>
|
|
</TouchableOpacity>
|
|
<Text style={styles.label}>{item.label}</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
paddingHorizontal: 30,
|
|
paddingVertical: 15,
|
|
alignItems: "center",
|
|
width: "50%",
|
|
},
|
|
label: {
|
|
marginTop: 5,
|
|
textAlign: "center",
|
|
},
|
|
});
|
|
|
|
export default CategoryPickerItem;
|