aboutsummaryrefslogtreecommitdiff
path: root/src/components/moments/CaptionScreenHeader.tsx
blob: 46dfddfec31a6fa1e023586d04e9221169b09b7f (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
29
30
31
32
33
34
35
36
37
38
import React from 'react';
import {Text, View, StyleSheet, ViewProps} from 'react-native';
interface CaptionScreenHeaderProps extends ViewProps {
  title: string;
}
const CaptionScreenHeader: React.FC<CaptionScreenHeaderProps> = ({
  title,
  style,
}) => {
  return (
    <View style={[styles.container, style]}>
      <View style={styles.headerContainer}>
        <Text style={styles.header}>{title}</Text>
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    height: '5%',
  },
  headerContainer: {
    position: 'absolute',
    left: '50%',
  },
  header: {
    position: 'relative',
    right: '50%',
    fontSize: 20,
    fontWeight: 'bold',
    color: 'white',
  },
});
export default CaptionScreenHeader;