import { type FC } from 'react';

import { IconX } from '@material-hu/icons/tabler';
import IconButton from '@material-hu/mui/IconButton';
import { useTheme } from '@material-hu/mui/styles';

type CloseActionHeaderProps = {
  onClose: () => void;
};

const CloseActionHeader: FC<CloseActionHeaderProps> = props => {
  const { onClose } = props;
  const theme = useTheme();
  return (
    <IconButton onClick={onClose}>
      <IconX color={theme.palette.new.text.neutral.default} />
    </IconButton>
  );
};

export default CloseActionHeader;
