import React from 'react'; import { Text, View, StyleSheet, TouchableOpacity } from 'react-native'; import { useNavigation } from '@react-navigation/native'; export interface Props { item: { text: string; background: string; key: number; datos: DataCard[]; }; } export interface DataCard { text: string; title: string; } export const CardsSabiasQue = ({ item }: Props) => { const navigate = useNavigation(); function NavigationScreen() { navigate.navigate('InformacionCard', { key: [...item.datos] }); } return ( {item.text} ); }; const styles = StyleSheet.create({ container: { width: 200, marginLeft: 15, height: 150, display: 'flex', justifyContent: 'center', alignItems: 'center', boxShadow: 'inset 5em 1em gold', shadowColor: '#000', padding: 10, shadowOffset: { width: 0, height: 2, }, shadowOpacity: 0.25, shadowRadius: 3.84, elevation: 5, }, description: { fontWeight: 'bold', fontSize: 16, color: '#1b003a', }, });