import React, { Component } from 'react';
import {
Platform,
SectionList,
StyleSheet,
Text,
TouchableNativeFeedback,
TouchableOpacity,
View
} from 'react-native';
const TouchableItem =
Platform.OS === 'ios' ? TouchableOpacity : TouchableNativeFeedback;
export default class JournalItems extends Component {
render() {
if (this.props.items.length === 0)
return (
Keine Einträge im Tagebuch
);
return (
(
{item.text}
)}
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'
}
});