aboutsummaryrefslogtreecommitdiff
path: root/src/components/messages/DateHeader.tsx
blob: cc7dce2c6d65689ad32e2dd507062846eadca130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;