import { Chantier } from '@/class/class'; import { ThemedView, } from '@/components/theme/themed-view'; import React from 'react'; import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import { ThemedText } from './theme/themed-text'; type Props = { data: { chantier:Chantier|null; } style?: StyleProp; }; export default function ChantierSummary({data,style , ...otherProps }: Props) { return( {data.chantier ? ( Adresse: {data.chantier.adresse} Chef de chantier: {data.chantier.chef.last_name}{" "}{data.chantier.chef.name} État: {data.chantier.etat} ) : Pas de chantier Selectionné } ) } const styles = StyleSheet.create({ chantier: { padding: 5, //marginTop:5, //margin:5, borderRadius: 10, //borderWidth: 1, flexDirection: 'row', height: 150, }, image:{ margin:0, width: 70, height: 140, borderRadius: 5, marginRight: 10, }, });