We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4062cf1 commit e54e76dCopy full SHA for e54e76d
playground/src/app/(demo)/dialog/modules/AutoClose.tsx
@@ -11,6 +11,10 @@ const AutoClose = () => {
11
<Dialog
12
title="Dialog Title"
13
trigger={<Button variant="outline">Open</Button>}
14
+ contentProps={{
15
+ onEscapeKeyDown: e => e.preventDefault(),
16
+ onPointerDownOutside: e => e.preventDefault()
17
+ }}
18
footer={
19
<>
20
<DialogClose>
@@ -19,8 +23,6 @@ const AutoClose = () => {
23
<Button>Confirm</Button>
24
</>
21
25
}
22
- onEscapeKeyDown={e => e.preventDefault()}
- onPointerDownOutside={e => e.preventDefault()}
26
>
27
<div>Dialog Content</div>
28
</Dialog>
0 commit comments