import React from 'react';
import { Button } from '@mui/material';
import PropTypes from 'prop-types';


function ToggleBtn({ showLiveData, onToggleData, disabled}) {

  return (
    <div>
      <Button sx={{ height:"47px"}}  variant="contained" onClick={onToggleData} disabled={disabled} > 
        {showLiveData ? "Show Today's Data" : "Show Live Data"}
      </Button>
    </div>
  );

}

ToggleBtn.propTypes = {
  showLiveData: PropTypes.bool.isRequired,
  onToggleData: PropTypes.func.isRequired,
  disabled: PropTypes.bool,
};

export default ToggleBtn;
