{"size": 694, "ext": "js", "max_stars_repo_path": "src/components/Navbar/NavItem.js", "max_stars_repo_name": "q6862865/EBE_DS", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Navbar/NavItem.js", "max_issues_repo_name": "q6862865/EBE_DS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Navbar/NavItem.js", "max_forks_repo_name": "q6862865/EBE_DS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.7948717949, "max_line_length": 54, "alphanum_fraction": 0.6325648415}
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

const List = styled.ul`
  margin: 0;
  padding: 0;
  float: ${props => (props.right ? 'right' : 'left')};

  & > li {
    display: inline-block;
    margin: 15px 10px;

    & > button {
      margin-top: -10px;
    }
  }
`;

const NavItem = ({ children, className, right }) => (
  <List right={right} className={className}>
    {children}
  </List>
);

NavItem.propTypes = {
  children: PropTypes.arrayOf(PropTypes.element),
  className: PropTypes.string,
  right: PropTypes.boolean,
};

NavItem.defaultProps = {
  children: [],
  className: '',
  right: false,
};

export default NavItem;
