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.

33 lines
869 B

// components/MoveListItem.test.ts
import { Move } from "../entities/Move";
import React from "react";
import { StyleSheet, Text, TouchableOpacity } from "react-native";
type MoveListItemProps = {
move: Move;
onPress: () => void;
};
const MoveListItem: React.FC<MoveListItemProps> = ({ move, onPress }) => (
<TouchableOpacity style={styles.listItem} onPress={onPress}>
<Text style={styles.listItemText}>{move.name}, {move.type.name}: {move.power}</Text>
</TouchableOpacity>
);
const styles = StyleSheet.create({
listItem: {
backgroundColor: '#DDD',
padding: 20,
marginVertical: 8,
marginHorizontal: 16,
borderRadius: 10,
},
listItemText: {
color: '#333',
fontSize: 18,
},
});
export default MoveListItem;