HeaderTitle.js
595 Bytes
import * as React from 'react';
import { Text, View, Platform, StyleSheet, Animated } from 'react-native';
const AnimatedText = Animated.Text;
const HeaderTitle = ({ style, ...rest }) => <AnimatedText numberOfLines={1} {...rest} style={[styles.title, style]} accessibilityTraits="header" />;
const styles = StyleSheet.create({
title: {
fontSize: Platform.OS === 'ios' ? 17 : 20,
fontWeight: Platform.OS === 'ios' ? '600' : '500',
color: 'rgba(0, 0, 0, .9)',
textAlign: Platform.OS === 'ios' ? 'center' : 'left',
marginHorizontal: 16
}
});
export default HeaderTitle;