fix: analytics dialog close on outside click (#3987)

This commit is contained in:
Lakhan Baheti 2024-03-20 12:42:10 +05:30 committed by GitHub
parent 293854fb3a
commit 6a245e121a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,32 +36,34 @@ export const ProjectAnalyticsModal: React.FC<Props> = observer((props) => {
leaveFrom="translate-x-0" leaveFrom="translate-x-0"
leaveTo="translate-x-full" leaveTo="translate-x-full"
> >
<Dialog.Panel className="fixed inset-0 z-20 h-full w-full overflow-y-auto"> <div className="fixed inset-0 z-20 h-full w-full overflow-y-auto">
<div <Dialog.Panel>
className={`fixed right-0 top-0 z-20 h-full bg-custom-background-100 shadow-custom-shadow-md ${
fullScreen ? "w-full p-2" : "w-full sm:w-full md:w-1/2"
}`}
>
<div <div
className={`flex h-full flex-col overflow-hidden border-custom-border-200 bg-custom-background-100 text-left ${ className={`fixed right-0 top-0 z-20 h-full bg-custom-background-100 shadow-custom-shadow-md ${
fullScreen ? "rounded-lg border" : "border-l" fullScreen ? "w-full p-2" : "w-full sm:w-full md:w-1/2"
}`} }`}
> >
<ProjectAnalyticsModalHeader <div
fullScreen={fullScreen} className={`flex h-full flex-col overflow-hidden border-custom-border-200 bg-custom-background-100 text-left ${
handleClose={handleClose} fullScreen ? "rounded-lg border" : "border-l"
setFullScreen={setFullScreen} }`}
title={cycleDetails?.name ?? moduleDetails?.name ?? projectDetails?.name ?? ""} >
/> <ProjectAnalyticsModalHeader
<ProjectAnalyticsModalMainContent fullScreen={fullScreen}
fullScreen={fullScreen} handleClose={handleClose}
cycleDetails={cycleDetails} setFullScreen={setFullScreen}
moduleDetails={moduleDetails} title={cycleDetails?.name ?? moduleDetails?.name ?? projectDetails?.name ?? ""}
projectDetails={projectDetails} />
/> <ProjectAnalyticsModalMainContent
fullScreen={fullScreen}
cycleDetails={cycleDetails}
moduleDetails={moduleDetails}
projectDetails={projectDetails}
/>
</div>
</div> </div>
</div> </Dialog.Panel>
</Dialog.Panel> </div>
</Transition.Child> </Transition.Child>
</Dialog> </Dialog>
</Transition.Root> </Transition.Root>