File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
src/components/action-sheet Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,14 @@ import { ViewController } from '../nav/view-controller';
47
47
encapsulation : ViewEncapsulation . None ,
48
48
} )
49
49
export class ActionSheetCmp {
50
- private d : any ;
50
+ private d : {
51
+ title ?: string ;
52
+ subTitle ?: string ;
53
+ cssClass ?: string ;
54
+ buttons ?: Array < any > ;
55
+ enableBackdropDismiss ?: boolean ;
56
+ cancelButton : any ;
57
+ } ;
51
58
private descId : string ;
52
59
private enabled : boolean ;
53
60
private hdrId : string ;
@@ -64,7 +71,10 @@ export class ActionSheetCmp {
64
71
this . d = params . data ;
65
72
66
73
if ( this . d . cssClass ) {
67
- renderer . setElementClass ( _elementRef . nativeElement , this . d . cssClass , true ) ;
74
+ this . d . cssClass . split ( ' ' ) . forEach ( cssClass => {
75
+ // Make sure the class isn't whitespace, otherwise it throws exceptions
76
+ if ( cssClass . trim ( ) !== '' ) renderer . setElementClass ( _elementRef . nativeElement , cssClass , true ) ;
77
+ } ) ;
68
78
}
69
79
70
80
this . id = ( ++ actionSheetIds ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ class E2EPage {
96
96
this . result = 'Destructive' ;
97
97
}
98
98
}
99
- ]
99
+ ] ,
100
+ cssClass : 'my-action-sheet another-action-sheet-class'
100
101
} ) ;
101
102
102
103
actionSheet . present ( actionSheet ) ;
You can’t perform that action at this time.
0 commit comments