Explorar o código

fix nonClosable dialog had close button

Abhinav %!s(int64=3) %!d(string=hai) anos
pai
achega
24d1f0284c
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/components/DialogBox/index.tsx

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

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