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

import { BOX_SHADOW_SIDEBAR_BUTTONS } from 'src/constants/orgChart';

export type SidebarButtonProps = {
  Icon: any;
  handleOnClick: any;
};

const SidebarButton = (props: SidebarButtonProps) => {
  const { Icon, handleOnClick } = props;

  return (
    <IconButton
      onClick={handleOnClick}
      sx={{
        boxShadow: BOX_SHADOW_SIDEBAR_BUTTONS,
        borderRadius: '4px',
        backgroundColor: theme => theme.palette.new.background.elements.default,
        p: 0.8,
        mb: 0.6,
        width: 'fit-content',
      }}
    >
      <Icon />
    </IconButton>
  );
};

export default SidebarButton;
