import React from "react"; import { Pressable, StyleSheet, Text, View } from "react-native"; import { Colors } from "@/theme"; import type { CollectionItemRendererProps } from "../types/renderer.types"; /** Safe, schema-agnostic fallback for collection items. */ export function GenericCardRenderer({ item, onPress }: CollectionItemRendererProps) { return ( [styles.pressable, pressed && styles.pressed]} > {item.title || "Untitled content"} {item.summary ? {item.summary} : null} ); } const styles = StyleSheet.create({ pressable: { marginHorizontal: 16, marginVertical: 5, }, pressed: { opacity: 0.72, }, card: { paddingHorizontal: 16, paddingVertical: 14, borderRadius: 14, borderWidth: 1, borderColor: "#DDE7E1", backgroundColor: "#FFFFFF", }, title: { fontSize: 17, lineHeight: 23, fontWeight: "700", color: Colors.textPrimary, }, summary: { marginTop: 5, fontSize: 14, lineHeight: 20, color: Colors.textSecondary, }, });