{"size": 1010, "ext": "js", "max_stars_repo_path": "src/shared/header.js", "max_stars_repo_name": "Callmenorm/reddit-react-native", "max_stars_repo_stars_event_min_datetime": "2016-09-02T19:19:32.000Z", "max_stars_repo_stars_event_max_datetime": "2016-09-02T19:19:32.000Z", "max_issues_repo_path": "src/shared/header.js", "max_issues_repo_name": "Callmenorm/reddit-react-native", "max_issues_repo_issues_event_min_datetime": "2016-02-18T06:05:19.000Z", "max_issues_repo_issues_event_max_datetime": "2016-02-18T06:05:19.000Z", "max_forks_repo_path": "src/shared/header.js", "max_forks_repo_name": "Callmenorm/reddit-react-native", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 17.7192982456, "max_line_length": 46, "alphanum_fraction": 0.5475247525}
import React, {
  PropTypes,
  StyleSheet,
  Text,
  View
} from 'react-native';
import HeaderOption from './headerOption';

const styles = StyleSheet.create({
  toolbar: {
    backgroundColor: '#4285f4',
    flexDirection: 'row',
    height: 50,
    justifyContent: 'space-between',
    paddingTop: 20,
    paddingRight: 10,
    paddingLeft: 10
  }
});

const headerOptions = [
  'Home',
  'Hot'
];

const Header = React.createClass({
  displayName: 'Header',
  propTypes: {
    navigator: PropTypes.shape({
      push: PropTypes.func
    }).isRequired
  },
  handleNavigate() {
    this.props.navigator.push({
      name: 'App'
    });
  },
  render() {
    return (
      <View style={styles.toolbar}>
        {headerOptions.map((name, idx) => {
          return (
            <HeaderOption
              key={idx}
              name={name}
              navigator={this.props.navigator}
            />
          );
        })}
        <Text>Back</Text>
      </View>
    );
  }
});

export default Header;
