diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-21 13:56:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 13:56:42 -0400 |
commit | 45c0935d4c18ca7bd18ba56aa5ae37f4c40dc9f2 (patch) | |
tree | e83d39e418d4e8675ef2b26474d8335401b81322 /src/components/messages/DateHeader.tsx | |
parent | 83538ee79a9c2a8d5024e0987372a32dffe3d05d (diff) | |
parent | 59d90f15809890da05ede6a04e532da6a7af8d0b (diff) |
Merge pull request #371 from shravyaramesh/chat-screen-styling-2
[TMA782/810] Inline dates and Read Receipts
Diffstat (limited to 'src/components/messages/DateHeader.tsx')
-rw-r--r-- | src/components/messages/DateHeader.tsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/messages/DateHeader.tsx b/src/components/messages/DateHeader.tsx new file mode 100644 index 00000000..cc7dce2c --- /dev/null +++ b/src/components/messages/DateHeader.tsx @@ -0,0 +1,28 @@ +import React from 'react'; +import {View, Text, StyleSheet} from 'react-native'; +import {getFormatedDate, normalize} from '../../utils'; + +interface DateHeaderProps { + date: object; +} + +const DateHeader: React.FC<DateHeaderProps> = ({date}) => { + return ( + <View style={styles.dateContainer}> + <Text style={styles.dateHeader}>{getFormatedDate(date)}</Text> + </View> + ); +}; + +const styles = StyleSheet.create({ + dateHeader: { + color: '#7A7A7A', + fontWeight: '600', + fontSize: normalize(11), + textAlign: 'center', + marginVertical: '5%', + }, + dateContainer: {backgroundColor: 'transparent'}, +}); + +export default DateHeader; |