UNPKG

subhasmitalmg-react-spreadsheet-import

Version:

React spreadsheet import for xlsx and csv files with column matching and validation steps

13 lines (10 loc) 1.08 kB
import { jsx, jsxs } from 'react/jsx-runtime'; import { AlertDialog, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogBody, AlertDialogFooter, Button } from '@chakra-ui/react'; import { useRef } from 'react'; import { useRsi } from '../../hooks/useRsi.js'; const NoDataPresentAlert = ({ isOpen, onClose }) => { const { allowInvalidSubmit, translations } = useRsi(); const cancelRef = useRef(null); return (jsx(AlertDialog, { isOpen: isOpen, onClose: onClose, leastDestructiveRef: cancelRef, isCentered: true, id: "rsi", children: jsx(AlertDialogOverlay, { children: jsxs(AlertDialogContent, { children: [jsx(AlertDialogHeader, { fontSize: "lg", fontWeight: "bold", children: translations.alerts.noValidDataFound.headerTitle }), jsx(AlertDialogBody, { children: translations.alerts.noValidDataFound.successMessage }), jsx(AlertDialogFooter, { children: jsx(Button, { ref: cancelRef, onClick: onClose, variant: "secondary", children: translations.alerts.submitIncomplete.cancelButtonTitle }) })] }) }) })); }; export { NoDataPresentAlert };