@@ -44,7 +44,7 @@ import type { MoveSheetToBreakpointOptions } from './gestures/sheet';
4444import { createSheetGesture } from './gestures/sheet' ;
4545import { createSwipeToCloseGesture } from './gestures/swipe-to-close' ;
4646import type { ModalBreakpointChangeEventDetail , ModalHandleBehavior } from './modal-interface' ;
47- import { setCardStatusBarDark , setCardStatusBarDefault } from './utils' ;
47+ import { setCardStatusBarDark , setCardStatusBarDefault , staticBackdropOpacity } from './utils' ;
4848
4949// TODO(FW-2832): types
5050
@@ -83,6 +83,10 @@ export class Modal implements ComponentInterface, OverlayInterface {
8383 private inheritedAttributes : Attributes = { } ;
8484 private statusBarStyle ?: StatusBarStyle ;
8585
86+ get theme ( ) : Theme {
87+ return getIonTheme ( this ) ;
88+ }
89+
8690 private inline = false ;
8791 private workingDelegate ?: FrameworkDelegate ;
8892
@@ -574,7 +578,8 @@ export class Modal implements ComponentInterface, OverlayInterface {
574578 presentingEl : presentingElement ,
575579 currentBreakpoint : this . initialBreakpoint ,
576580 backdropBreakpoint : this . backdropBreakpoint ,
577- theme : getIonTheme ( this ) ,
581+ initialBackdropOpacity : this . theme === 'ionic' ? staticBackdropOpacity : undefined ,
582+ backdropOpacityValue : this . theme === 'ionic' ? staticBackdropOpacity : undefined ,
578583 } ) ;
579584
580585 /* tslint:disable-next-line */
@@ -792,7 +797,8 @@ export class Modal implements ComponentInterface, OverlayInterface {
792797 presentingEl : presentingElement ,
793798 currentBreakpoint : this . currentBreakpoint ?? this . initialBreakpoint ,
794799 backdropBreakpoint : this . backdropBreakpoint ,
795- theme : getIonTheme ( this ) ,
800+ initialBackdropOpacity : this . theme === 'ionic' ? staticBackdropOpacity : undefined ,
801+ backdropOpacityValue : this . theme === 'ionic' ? staticBackdropOpacity : undefined ,
796802 }
797803 ) ;
798804
@@ -1048,14 +1054,12 @@ interface ModalOverlayOptions {
10481054 */
10491055 currentBreakpoint ?: number ;
10501056 /**
1051- * The point after which the backdrop will being
1057+ * The point after which the backdrop will begin
10521058 * to fade in when using a sheet modal.
10531059 */
10541060 backdropBreakpoint : number ;
1055- /**
1056- * The theme used by the sheet modal
1057- */
1058- theme : Theme ;
1061+ initialBackdropOpacity ?: string ;
1062+ backdropOpacityValue ?: string ;
10591063}
10601064
10611065type ModalPresentOptions = ModalOverlayOptions ;
0 commit comments