@@ -67,7 +67,7 @@ export interface BaseDialogProps
6767 * A function used to close the dialog when the overlay is clicked or the
6868 * escape key is pressed when the `modal` prop is not enabled.
6969 */
70- onRequestClose : ( ) => void ;
70+ onRequestClose ( ) : void ;
7171
7272 /**
7373 * The tab index for the sheet. This should normally stay at `-1`.
@@ -187,6 +187,13 @@ export interface BaseDialogProps
187187 * conditionally render a navigation panel.
188188 */
189189 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" > ;
190197}
191198
192199export type DialogProps = LabelRequiredForA11y < BaseDialogProps > ;
@@ -319,6 +326,7 @@ export const Dialog = forwardRef<HTMLDivElement, DialogProps>(function Dialog(
319326 disableFocusOnUnmount = false ,
320327 disableNestedDialogFixes = false ,
321328 onKeyDown,
329+ overlayProps,
322330 ...props
323331 } ,
324332 nodeRef
@@ -345,6 +353,7 @@ export const Dialog = forwardRef<HTMLDivElement, DialogProps>(function Dialog(
345353 overlayEl = (
346354 < Overlay
347355 id = { `${ id } -overlay` }
356+ { ...overlayProps }
348357 style = { overlayStyle }
349358 className = { cn ( "rmd-dialog-overlay" , overlayClassName ) }
350359 hidden = { overlayHidden || disableOverlay }
0 commit comments