subhasmitalmg-react-spreadsheet-import
Version:
React spreadsheet import for xlsx and csv files with column matching and validation steps
13 lines (10 loc) • 1.07 kB
JavaScript
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 SubmitSuccessAlert = ({ 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.submitSuccess.headerTitle }), jsx(AlertDialogBody, { children: translations.alerts.submitSuccess.successMessage }), jsx(AlertDialogFooter, { children: jsx(Button, { ref: cancelRef, onClick: onClose, variant: "secondary", children: translations.alerts.submitSuccess.closeButtonTitle }) })] }) }) }));
};
export { SubmitSuccessAlert };