import { CloseOutlined } from '@ant-design/icons';
import styles from '../../EventsJournalDashboard/EventCardInfo.module.scss';

const DrawerHeader = ({
  translations: { title },
  parentDrawer,
}: {
  translations: { title: string };
  parentDrawer: () => void;
}): JSX.Element => {
  return (
    <div className={styles['cardHeader']}>
      <span className={styles['cardHeader_title']}>{`${title}`}</span>
      <div className={styles['cardHeader_icon-block']}>
        <CloseOutlined
          className={styles['cardHeader_icon-block-closeIcon']}
          onClick={parentDrawer}
        />
      </div>
    </div>
  );
};

export default DrawerHeader;
