updates on the ui changes and changed into doormile

This commit is contained in:
2026-08-24 18:10:47 +05:30
parent dcf9770ada
commit aa42d9ee81
409 changed files with 49950 additions and 66532 deletions

View File

@@ -0,0 +1,42 @@
import PropTypes from 'prop-types';
// third-party
import { CSVLink } from 'react-csv';
import { MdDownload } from 'react-icons/md';
import { Button } from '@astryxdesign/core/Button';
// ==============================|| CSV EXPORT ||============================== //
// This file used to be Mantis's 596-line react-table v7 toolkit — HeaderSort,
// TablePagination, IndeterminateCheckbox, TableRowSelection, DraggableHeader,
// DragPreview, DraggableRow, HidingSelect, SortingSelect, EmptyTable. None of
// them were imported anywhere: the two consumers (dispatch/Preview.js and
// reports/ordersDetails.js) only ever pulled `CSVExport`. Rather than port ten
// dead helpers to Astryx, they were deleted and only the export button remains.
export const CSVExport = ({ data, filename, headers, label, style, btnLoading, onClick }) => (
<CSVLink data={data} filename={filename} headers={headers} style={{ textDecoration: 'none' }}>
<Button
label={label || 'Download'}
icon={btnLoading ? undefined : <MdDownload />}
variant={btnLoading ? 'secondary' : 'primary'}
isLoading={btnLoading}
isDisabled={btnLoading}
tooltip="CSV Export"
style={style}
onClick={(e) => onClick?.(e)}
/>
</CSVLink>
);
CSVExport.propTypes = {
data: PropTypes.array,
headers: PropTypes.any,
filename: PropTypes.string,
label: PropTypes.any,
style: PropTypes.object,
btnLoading: PropTypes.any,
onClick: PropTypes.func
};
export default CSVExport;