Files
birthday/apk/components/birthdate-item.tsx
2026-04-21 16:48:51 +02:00

39 lines
742 B
TypeScript

// BirthdayItem.tsx
import { StyleSheet, Text, View } from "react-native";
interface BirthdayItemProps {
name: string;
date: string;
age?: number;
}
export function BirthdayItem({ name, date, age }: BirthdayItemProps) {
return (
<View style={styles.itemContainer}>
<Text style={styles.name}>{name}</Text>
{age && <Text style={styles.age}>Age: {age}</Text>}
</View>
);
}
const styles = StyleSheet.create({
itemContainer: {
padding: 15,
borderRadius: 8,
backgroundColor: "#f0f0f0",
boxShadow: "0 1px 4px rgba(0,0,0,0.3)",
marginBottom: 10,
},
name: {
fontSize: 16,
fontWeight: "bold",
},
date: {
fontSize: 14,
},
age: {
fontSize: 12,
marginTop: 5,
},
});