import { StyleSheet, Text, View, Button, FlatList } from 'react-native'; import { StatusBar } from 'expo-status-bar'; import React, { useState } from "react"; import { Card } from '../models/Card'; //* Components import {ListItemComponent} from '../components/ListItemComponent' //@ts-ignore export default function DetailMain({ route }){ const { card, other } = route.params; let pressed : Boolean = false const [titleText, setTitleText] = useState(card.name) const onPressTitle = () => { pressed ? setTitleText(titleText + '\n' + 'Id : ' + card.id) : setTitleText(card.name) pressed ? pressed = false :pressed = true }; return ( {titleText} ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, item: { borderRadius : 15, backgroundColor: '#efefef', padding: 15, maxHeight:300, maxWidth:350, }, title: { fontStyle: "italic", fontSize: 20, }, titleView: { flex: 1, justifyContent: 'center', padding: 10, backgroundColor: '#fff', borderRadius : 10, borderWidth: 10, borderColor: '#efefef', maxHeight: 100, } });