Skip to content

Commit 3ad3c3a

Browse files
authored
Allow closing the task modal by clicking in the margins (#165)
1 parent 2d2096c commit 3ad3c3a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

apps/web/src/app/(authenticated)/usage/TaskModal.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,18 @@ export const TaskModal = ({ task, open, onClose }: TaskModalProps) => {
7272
return (
7373
<Dialog open={open} onOpenChange={onClose}>
7474
<DialogContentFullScreen>
75-
<TaskDetails
76-
task={task}
77-
messages={messages}
78-
headerActions={headerActions}
79-
/>
75+
<div className="fixed inset-0 p-8 md:p-16" onClick={onClose}>
76+
<div
77+
className="container mx-auto bg-background rounded-lg shadow-lg max-h-full overflow-hidden h-full"
78+
onClick={(e) => e.stopPropagation()}
79+
>
80+
<TaskDetails
81+
task={task}
82+
messages={messages}
83+
headerActions={headerActions}
84+
/>
85+
</div>
86+
</div>
8087
</DialogContentFullScreen>
8188
</Dialog>
8289
);

0 commit comments

Comments
 (0)