{"size": 745, "ext": "js", "max_stars_repo_path": "src/components/Calendar.js", "max_stars_repo_name": "velardevm/Mi-Libreta-reactjs", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Calendar.js", "max_issues_repo_name": "velardevm/Mi-Libreta-reactjs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Calendar.js", "max_forks_repo_name": "velardevm/Mi-Libreta-reactjs", "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": 27.5925925926, "max_line_length": 81, "alphanum_fraction": 0.6993288591}
import React from 'react'
import AdapterDateFns from '@mui/lab/AdapterDateFns'
import LocalizationProvider from '@mui/lab/LocalizationProvider'
import CalendarPicker from '@mui/lab/CalendarPicker'
import Grid from '@mui/material/Grid'
import PropTypes from 'prop-types'

const Calendar = (props) => {
  const { date, setDate } = props
  return (
    <LocalizationProvider dateAdapter={AdapterDateFns}>
      <Grid container spacing={3}>
        <Grid item xs={12} md={12}>
          <CalendarPicker date={date} onChange={(newDate) => setDate(newDate)} />
        </Grid>
      </Grid>
    </LocalizationProvider>
  )
}

Calendar.propTypes = {
  date: PropTypes.instanceOf(Date),
  setDate: PropTypes.func,
}

export default React.memo(Calendar)
