import React, { Component } from 'react';
import { SectionList, StyleSheet, Text, View } from 'react-native';
import JournalItemRow from './JournalItemRow';
export default class JournalItems extends Component {
render() {
if (this.props.items.length === 0)
return (
Keine Einträge im Tagebuch
);
return (
}
renderSectionHeader={({ section }) => (
{section.title}
)}
keyExtractor={item => item.date}
ItemSeparatorComponent={() => (
)}
/>
);
}
}
const styles = StyleSheet.create({
infoText: {
color: 'darkslategray',
fontSize: 22,
fontWeight: '300'
},
noItems: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
},
list: {
marginTop: 24
},
listHeader: {
color: 'gray',
backgroundColor: 'lightcyan',
textAlign: 'center'
},
listSeparator: {
height: StyleSheet.hairlineWidth,
backgroundColor: 'lightblue'
}
});