{"size": 752, "ext": "js", "max_stars_repo_path": "packages/Burger/index.js", "max_stars_repo_name": "BHurworth/animated-burgers", "max_stars_repo_stars_event_min_datetime": "2019-01-30T07:56:51.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T11:06:49.000Z", "max_issues_repo_path": "packages/Burger/index.js", "max_issues_repo_name": "janakhpon/animated-burgers", "max_issues_repo_issues_event_min_datetime": "2019-01-31T09:56:44.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T21:21:13.000Z", "max_forks_repo_path": "packages/Burger/index.js", "max_forks_repo_name": "janakhpon/animated-burgers", "max_forks_repo_forks_event_min_datetime": "2019-01-31T06:56:29.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-24T18:10:23.000Z"}
{"max_stars_count": 869, "max_issues_count": 28, "max_forks_count": 85, "avg_line_length": 18.3414634146, "max_line_length": 88, "alphanum_fraction": 0.6117021277}
// @flow
import React from 'react'
import classnames from 'classnames'
import './styles.scss'

const Burger = ({
  className,
  Component,
  isOpen,
  direction = null,
  ...rest
}) => (
  <Component
    className={ classnames('burger', className, {
      open: isOpen,
      [`burger-${direction}`]: direction,
    }) }
    { ...rest }
  >
    <div className="burger-lines" />
  </Component>
)

Burger.defaultProps = {
  className: null,
  Component: 'div',
  isOpen: false,
  direction: null,
}


export const createBurger = defaultClassName => ({ className, direction, ...rest }) => (
  <Burger
    className={ classnames(defaultClassName, className, {
      [`burger-${direction}`]: direction,
    }) }
    { ...rest }
  />
)
export default Burger
