fix: make modal don't close on overlay click; remove dismiss button in this modal.

This commit is contained in:
鲁树人 2023-06-11 23:25:49 +01:00
parent 7347db926e
commit a9e9671899

View File

@ -1,12 +1,10 @@
import { import {
Button,
Center, Center,
Flex, Flex,
Modal, Modal,
ModalBody, ModalBody,
ModalCloseButton, ModalCloseButton,
ModalContent, ModalContent,
ModalFooter,
ModalHeader, ModalHeader,
ModalOverlay, ModalOverlay,
Tab, Tab,
@ -63,7 +61,7 @@ export function ImportFileModal({ onClose, show }: ImportFileModalProps) {
}; };
return ( return (
<Modal isOpen={show} onClose={onClose} scrollBehavior="inside" size="xl"> <Modal isOpen={show} onClose={onClose} closeOnOverlayClick={false} scrollBehavior="inside" size="xl">
<ModalOverlay /> <ModalOverlay />
<ModalContent> <ModalContent>
<ModalHeader></ModalHeader> <ModalHeader></ModalHeader>
@ -88,12 +86,6 @@ export function ImportFileModal({ onClose, show }: ImportFileModalProps) {
</TabPanels> </TabPanels>
</Flex> </Flex>
</Flex> </Flex>
<ModalFooter>
<Button mr={3} onClick={onClose}>
</Button>
</ModalFooter>
</ModalContent> </ModalContent>
</Modal> </Modal>
); );