Ver código fonte

fix nonClosable dialog had close button

Abhinav 3 anos atrás
pai
commit
24d1f0284c
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      src/components/DialogBox/index.tsx

+ 5 - 1
src/components/DialogBox/index.tsx

@@ -48,7 +48,11 @@ export default function DialogBox({
             {...props}>
             {attributes.title && (
                 <DialogTitleWithCloseButton
-                    onClose={titleCloseButton && handleClose}>
+                    onClose={
+                        titleCloseButton &&
+                        !attributes.nonClosable &&
+                        handleClose
+                    }>
                     {attributes.title}
                 </DialogTitleWithCloseButton>
             )}