@@ -18,22 +18,19 @@ import {
1818} from "@chakra-ui/react"
1919import React from "react"
2020
21- const Modal = ( { title, src, children, actions} ) => {
21+ const Modal = ( { title, src, children, actions, size = "2xl" } ) => {
2222const { isOpen, onOpen, onClose} = useDisclosure ( )
2323return (
2424< >
25- < Tooltip label = { title } aria-label = { title } hasArrow rounded = "md" >
26- < Button onClick = { onOpen } variant = "ghost" >
27- { src }
28- </ Button >
29- </ Tooltip >
25+ < Box onClick = { onOpen } > { src } </ Box >
3026< ChakModal
3127isOpen = { isOpen }
3228onClose = { onClose }
3329isCentered
3430motionPreset = "scale"
35- size = "2xl"
31+ size = { size }
3632autoFocus = { false }
33+ returnFocusOnClose = { false }
3734>
3835< ModalOverlay background = "rgba(78,86,107,0.71)" />
3936< ModalContent >
@@ -44,14 +41,19 @@ const Modal = ({ title, src, children, actions }) => {
4441</ Heading >
4542< Flex >
4643< Box > { actions } </ Box >
47- < Button onClick = { onClose } variant = "subtle" >
44+ < Button
45+ onClick = { onClose }
46+ variant = "subtle"
47+ pos = "relative"
48+ right = "-20px"
49+ >
4850< CloseIcon />
4951</ Button >
5052</ Flex >
5153</ Flex >
5254</ ModalHeader >
5355< Divider />
54- < ModalBody pt = "0 "px = "10" pb = "10" >
56+ < ModalBody py = "5 "px = "10" >
5557{ typeof children === "function" ?children ( ) :children }
5658</ ModalBody >
5759</ ModalContent >