import React from 'react';
import { useDispatch } from 'react-redux';
import { printPage } from '../../store/print/print.actions';
import { CustomHtmlTitle } from 'app/shared/components/customHtmlTitle/customHtmlTitle';


const PrintButton = () => {
  const dispatch = useDispatch();

  return (
    <div className="u-hide--lg">
      <CustomHtmlTitle text="Print page" position='responsive-top'>
        <i className="icon-print u-cursor--pointer" onClick={() => dispatch(printPage())} />
      </CustomHtmlTitle>
    </div>
  );
};

export { PrintButton };
