NewscoutCenteredTitleHeader.js 851 B

123456789101112131415161718192021222324252627282930313233
  1. import { StyleSheet, Text, View, TouchableOpacity} from 'react-native'
  2. import React from 'react'
  3. import Header from '../../atoms/Header'
  4. import fonts from '../../../theme/fonts'
  5. import colors from '../../../theme/colors'
  6. const NewscoutCenteredTitleHeader = ({children, backButtonShown, onBackClick, title, titleStyle }) => {
  7. return (
  8. <Header onBackClick={onBackClick} backButtonShown>
  9. <Text style={[styles.title, titleStyle]}>{title ?? "Title"}</Text>
  10. {children}
  11. </Header>
  12. )
  13. }
  14. export default NewscoutCenteredTitleHeader
  15. const styles = StyleSheet.create({
  16. title: {
  17. fontFamily: fonts.type.semibold,
  18. fontSize: fonts.getSize(16),
  19. color: colors.black,
  20. },
  21. titleContainer:{
  22. flexDirection:'row',
  23. alignItems:'center',
  24. gap: 8
  25. }
  26. })