@@ -67,7 +67,7 @@ export interface BaseDialogProps
67
67
* A function used to close the dialog when the overlay is clicked or the
68
68
* escape key is pressed when the `modal` prop is not enabled.
69
69
*/
70
- onRequestClose : ( ) => void ;
70
+ onRequestClose ( ) : void ;
71
71
72
72
/**
73
73
* The tab index for the sheet. This should normally stay at `-1`.
@@ -187,6 +187,13 @@ export interface BaseDialogProps
187
187
* conditionally render a navigation panel.
188
188
*/
189
189
component ?: "div" | "nav" ;
190
+
191
+ /**
192
+ * Any additional props that should be passed to the `Overlay` element.
193
+ *
194
+ * @remarks \@since 5.0.0
195
+ */
196
+ overlayProps ?: Omit < HTMLAttributes < HTMLSpanElement > , "style" | "className" > ;
190
197
}
191
198
192
199
export type DialogProps = LabelRequiredForA11y < BaseDialogProps > ;
@@ -319,6 +326,7 @@ export const Dialog = forwardRef<HTMLDivElement, DialogProps>(function Dialog(
319
326
disableFocusOnUnmount = false ,
320
327
disableNestedDialogFixes = false ,
321
328
onKeyDown,
329
+ overlayProps,
322
330
...props
323
331
} ,
324
332
nodeRef
@@ -345,6 +353,7 @@ export const Dialog = forwardRef<HTMLDivElement, DialogProps>(function Dialog(
345
353
overlayEl = (
346
354
< Overlay
347
355
id = { `${ id } -overlay` }
356
+ { ...overlayProps }
348
357
style = { overlayStyle }
349
358
className = { cn ( "rmd-dialog-overlay" , overlayClassName ) }
350
359
hidden = { overlayHidden || disableOverlay }
0 commit comments