import React from 'react'; import { useDispatch } from 'react-redux'; import { exportTableXlsxAction } from 'app/modules/exportToXls/store/exportXlsx.actions'; import { ButtonDownloadProps } from './buttonDownloadXLS.types'; import { CustomHtmlTitle } from '../../../../shared/components/customHtmlTitle/customHtmlTitle'; const ButtonDownloadXLS = ({ columnsConfig, rowsData, excelFileName, excelFileSuffix, extraClass='' }: ButtonDownloadProps) => { const dispatch = useDispatch(); const payload = { rows: rowsData, columnsStyle: columnsConfig, fileName: excelFileName, excelFileSuffix: excelFileSuffix, }; return (
dispatch(exportTableXlsxAction(payload))} />
); }; export { ButtonDownloadXLS };