text: import React from 'react';
  import PropTypes from 'prop-types';
  import useScrollTrigger from '@material-ui/core/useScrollTrigger';
  
  const AppBarElevation = (props) => {
    const { children } = props;
    const trigger = useScrollTrigger({
      disableHysteresis: true,
      threshold: 0,
    });
  
    return React.cloneElement(children, {
      elevation: trigger ? 4 : 0,
    });
  }
  
  AppBarElevation.propTypes = {
    children: PropTypes.element.isRequired,
  };
  
  export default AppBarElevation;
  