Files
react-navigation/src/views/HeaderTitle.js
Mike Grabowski bbe9caff06 Fix eslint issues and turn on prettier by default (#1195)
* Automatically generate prop-types from Flow

* Remove propTypes usage

* Fix flow

* Modify some eslint settings

* Fix flowtype

* Lint tweaks

* use prop-types pkg

* Run prettier

* Fix flow

* Fix few lint issues

* Make eslint pass

* Run lint on tests

* Fix flow

* Fixes

* Alphabetical

* Trailing comma: ES5 for website compat, also fix config/paths

* Apply eslint --fix only to src now

* Fix missing transitionconfig

* Update TypeDefinition.js

* New stuff

* Unstage website and examples

* reformat code

* Update circle.yml
2017-04-24 17:31:22 +05:30

34 lines
684 B
JavaScript

/* @flow */
import React from 'react';
import { Platform, StyleSheet, Text } from 'react-native';
import type { Style } from '../TypeDefinition';
type Props = {
tintColor?: ?string,
style?: Style,
};
const HeaderTitle = ({ style, ...rest }: Props) => (
<Text
numberOfLines={1}
{...rest}
style={[styles.title, style]}
accessibilityTraits="header"
/>
);
const styles = StyleSheet.create({
title: {
fontSize: Platform.OS === 'ios' ? 17 : 18,
fontWeight: Platform.OS === 'ios' ? '600' : '500',
color: 'rgba(0, 0, 0, .9)',
textAlign: Platform.OS === 'ios' ? 'center' : 'left',
marginHorizontal: 16,
},
});
export default HeaderTitle;