SectionHeader.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
  2. import React from 'react'
  3. import Header from '../../atoms/Header'
  4. import { List } from 'react-native-paper'
  5. import colors from '../../../theme/colors'
  6. import fonts from '../../../theme/fonts'
  7. const SectionHeader = ({ label, onPress }) => {
  8. return (
  9. <Header style={styles.recentHeader}>
  10. <Text style={styles.recentHeaderText}>{label}</Text>
  11. <TouchableOpacity onPress={onPress} style={{ flexDirection: 'row', justifyContent: 'space-evenly' }}>
  12. <Text style={styles.seeAllText}>See All</Text>
  13. <List.Icon style={styles.recentHeaderIcon} icon="arrow-right" color={colors.topColor} />
  14. </TouchableOpacity>
  15. </Header>
  16. )
  17. }
  18. export default SectionHeader
  19. const styles = StyleSheet.create({
  20. recentHeader: {
  21. paddingHorizontal: fonts.getSize(16),
  22. },
  23. recentHeaderText: {
  24. fontFamily: fonts.type.semibold,
  25. fontSize: fonts.getSize(16),
  26. color: colors.black
  27. },
  28. seeAllText: {
  29. fontFamily: fonts.type.semibold,
  30. color: colors.topColor,
  31. paddingRight: 16,
  32. alignSelf: 'stretch'
  33. },
  34. recentHeaderIcon: {
  35. },
  36. recentCardContainer: {
  37. flexDirection: 'column',
  38. paddingHorizontal: 16,
  39. overflow: 'hidden'
  40. },
  41. })