@@ -2,7 +2,7 @@ import { getIonMode } from '@global/ionic-global';
22import type { ComponentInterface } from '@stencil/core' ;
33import { Component , Element , Host , Prop , forceUpdate , h } from '@stencil/core' ;
44import { safeCall } from '@utils/overlays' ;
5- import { getClassMap } from '@utils/theme' ;
5+ import { getClassMap , hostContext } from '@utils/theme' ;
66
77import type { CheckboxCustomEvent } from '../checkbox/checkbox-interface' ;
88import type { RadioGroupCustomEvent } from '../radio-group/radio-group-interface' ;
@@ -74,6 +74,14 @@ export class SelectModal implements ComponentInterface {
7474 }
7575 }
7676
77+ private getModalContextClasses ( ) {
78+ const el = this . el ;
79+ return {
80+ 'in-modal-default' : hostContext ( 'ion-modal.modal-default' , el ) ,
81+ 'in-modalsheet' : hostContext ( 'ion-modal.modal-sheet' , el ) ,
82+ } ;
83+ }
84+
7785 private renderRadioOptions ( ) {
7886 const checked = this . options . filter ( ( o ) => o . checked ) . map ( ( o ) => o . value ) [ 0 ] ;
7987
@@ -143,7 +151,10 @@ export class SelectModal implements ComponentInterface {
143151
144152 render ( ) {
145153 return (
146- < Host class = { getIonMode ( this ) } >
154+ < Host class = { {
155+ [ getIonMode ( this ) ] : true ,
156+ ...this . getModalContextClasses ( ) ,
157+ } } >
147158 < ion-header >
148159 < ion-toolbar >
149160 { this . header !== undefined && < ion-title > { this . header } </ ion-title > }
0 commit comments