import IconButton from '@material-hu/mui/IconButton';

import HuTooltip from '@material-hu/components/design-system/Tooltip';

export type NavbarButtonProps = {
  title: string;
  ElementIcon: any;
  handleOnClick: any;
};

const NavbarButton = (props: NavbarButtonProps) => {
  const { title, ElementIcon, handleOnClick } = props;

  return (
    <HuTooltip
      description={title}
      direction="top"
    >
      <IconButton
        onClick={handleOnClick}
        sx={{
          mr: 1,
        }}
      >
        {ElementIcon}
      </IconButton>
    </HuTooltip>
  );
};

export default NavbarButton;
