{"size": 1416, "ext": "js", "max_stars_repo_path": "src/navigation/navbar/stories/sb.stories.js", "max_stars_repo_name": "tenjojeremy/Web-Features", "max_stars_repo_stars_event_min_datetime": "2019-09-04T11:35:13.000Z", "max_stars_repo_stars_event_max_datetime": "2019-09-04T11:35:13.000Z", "max_issues_repo_path": "src/navigation/navbar/stories/sb.stories.js", "max_issues_repo_name": "tenjojeremy/Web-Features", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/navigation/navbar/stories/sb.stories.js", "max_forks_repo_name": "tenjojeremy/Web-Features", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.0, "max_line_length": 82, "alphanum_fraction": 0.5459039548}
import React from 'react'
import { storiesOf } from '@storybook/react'

import { Route, useHistory, useLocation } from '../../router'
import B from '../../../../.storybook/customComponents/variationBlock'
import Bar from '../index'

import data from './navBar.links'
import data2 from './navBar.links2'

const testFileInput = (file) => {
  console.log(file)
}

const Child = () => {
  let history = useHistory()
  let location = useLocation()
  let router = { history, location }

  return (
    <>
      <B title='Example 1' noBackground style={{ width: 'auto' }}>
        <Bar router={router} data={data} onInput={testFileInput} />
      </B>
      <B title='Example 2' noBackground style={{ width: 'auto' }}>
        <Bar
          router={router}
          data={data2}
          onInput={testFileInput}
          onSearchSubmit={(value) => console.log(value)}
        />
      </B>
      <B
        noBackground
        style={{
          width: 'auto',
          position: 'fixed',
          bottom: 0,
          left: 0,
          right: 0,
        }}
      >
        <Bar
          router={router}
          data={data2}
          onInput={testFileInput}
          onSearchSubmit={(value) => console.log(value)}
        />
      </B>
    </>
  )
}

const Variations = () => {
  return <Route path='/' component={Child} />
}

storiesOf('Navigation|Nav Bar/React', module).add('Example', () => <Variations />)
