Skip to content

Commit e54e76d

Browse files
committed
fix: fix dielog type error
1 parent 4062cf1 commit e54e76d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

playground/src/app/(demo)/dialog/modules/AutoClose.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const AutoClose = () => {
1111
<Dialog
1212
title="Dialog Title"
1313
trigger={<Button variant="outline">Open</Button>}
14+
contentProps={{
15+
onEscapeKeyDown: e => e.preventDefault(),
16+
onPointerDownOutside: e => e.preventDefault()
17+
}}
1418
footer={
1519
<>
1620
<DialogClose>
@@ -19,8 +23,6 @@ const AutoClose = () => {
1923
<Button>Confirm</Button>
2024
</>
2125
}
22-
onEscapeKeyDown={e => e.preventDefault()}
23-
onPointerDownOutside={e => e.preventDefault()}
2426
>
2527
<div>Dialog Content</div>
2628
</Dialog>

0 commit comments

Comments
 (0)