HeaderTitle.js 670 B

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