HeaderTitle.js 749 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import React from 'react';
  2. import { Platform, StyleSheet, Text } from 'react-native';
  3. const HeaderTitle = ({scope, title="", style=styles.titleColor}) => (
  4. <Text
  5. ariaLevel="1"
  6. numberOfLines={1}
  7. allowFontScaling={false}
  8. accessibilityRole="header"
  9. style={[styles.title, style]}>
  10. {scope ? $t(scope) : title}
  11. </Text>
  12. );
  13. export default HeaderTitle;
  14. const styles = StyleSheet.create({
  15. title: Platform.select({
  16. ios: {
  17. fontSize: 17,
  18. fontWeight: '600'
  19. },
  20. android: {
  21. fontSize: 20,
  22. //fontFamily: 'sans-serif-medium',
  23. fontWeight: 'normal',
  24. lineHeight: 26
  25. },
  26. default: {
  27. fontSize: 18,
  28. fontWeight: '500'
  29. }
  30. }),
  31. titleColor: {
  32. color: pageTitleTint
  33. }
  34. })