File tree Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Original file line number Diff line number Diff line change 1
1
< div class ="container ">
2
- < button ejs-button (click) ="showClick ($event) "> Show Toast</ button >
3
- < button ejs-button (click) ="hideClick ($event) "> Hide Toast</ button >
2
+ < button ejs-button (click) ="showToast ($event) "> Show Toast</ button >
3
+ < button ejs-button (click) ="hideToast ($event) "> Hide Toast</ button >
4
4
</ div >
5
- < ejs-toast #toastObj [position] ='position ' [timeOut] ='5000 ' [showCloseButton] ="true " >
5
+ < ejs-toast #toastObj [position] ='position ' [timeOut] ='500 ' [showCloseButton] ="false " >
6
6
<!-- <ng-template #title>
7
7
<div>Matt sent you a friend request</div>
8
8
</ng-template>
13
13
< ng-template #template >
14
14
< div id ='template_toast '>
15
15
< div className ="horizontal-align ">
16
- < div className ='toast-content '>
17
- < div className ='toast-title '>
16
+ < div className ='toast-content ' style =" padding-bottom: 5px; " >
17
+ < div className ='toast-title ' style =" font-weight: bold; padding-bottom: 5px; " >
18
18
Weekend Alarm
19
19
</ div >
20
- < div className ='toast-message '>
21
- With traffic, its likely to take 45 minutes to get to jenny's 24th Birthday Bash at Hillside Bar, 454 E.
22
- Olive Way by 10:00PM
20
+ < div className ='toast-message ' style =" padding-bottom: 5px; " >
21
+ With traffic, its likely to take 45 minutes to get to jenny's 24th Birthday
22
+ Bash at Hillside Bar, 454 E. Olive Way by 10:00PM
23
23
</ div >
24
24
</ div >
25
25
</ div >
26
26
< img src ='https://ej2.syncfusion.com/demos/src/toast/resource/map.jpg ' />
27
27
</ div >
28
28
</ ng-template >
29
- </ ejs-toast >
29
+ </ ejs-toast >
Original file line number Diff line number Diff line change 1
1
import { Component , ViewChild } from '@angular/core' ;
2
2
import { RouterOutlet } from '@angular/router' ;
3
- import { ToastModule } from '@syncfusion/ej2-angular-notifications'
3
+ import { ToastModule , ToastComponent } from '@syncfusion/ej2-angular-notifications'
4
4
import { ButtonModule } from '@syncfusion/ej2-angular-buttons' ;
5
5
6
6
@Component ( {
7
7
selector : 'app-root' ,
8
8
standalone : true ,
9
- imports : [ RouterOutlet , ToastModule , ButtonModule ] ,
9
+ imports : [ RouterOutlet , ToastModule , ButtonModule ] ,
10
10
templateUrl : './app.component.html' ,
11
11
styleUrl : './app.component.css'
12
12
} )
13
13
export class AppComponent {
14
- @ViewChild ( 'toastObj' ) public toastObj : any ;
15
- public position = { X : 'Right' , Y : 'Top' } ;
14
+ @ViewChild ( 'toastObj' ) public toastObj : ToastComponent ;
16
15
17
- onCreate ( args : any ) {
18
- this . toastObj . show ( ) ;
19
- }
16
+ public position = { X : 'Right' , Y : 'Top' } ;
20
17
21
- showClick ( args : any ) {
18
+ showToast ( args : any ) {
22
19
this . toastObj . show ( ) ;
23
20
}
24
21
25
- hideClick ( args : any ) {
22
+ hideToast ( args : any ) {
26
23
this . toastObj . hide ( 'All' ) ;
27
24
}
28
-
29
-
30
25
}
Original file line number Diff line number Diff line change 4
4
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css' ;
5
5
@import '../node_modules/@syncfusion/ej2-angular-notifications/styles/material.css' ;
6
6
7
- .container
8
- {
9
- margin : 50px auto 0 ;
10
- width : 500px ;
11
- height : 700px ;
7
+ .container {
8
+ margin : 50px 600px 0 ;
9
+ width : 500px ;
10
+ height : 700px ;
11
+ }
12
+
13
+ button .e-control .e-btn .e-lib {
14
+ margin : 10px
12
15
}
13
16
14
17
img {
18
+ padding-bottom : 15px ;
15
19
width : 100% ;
16
20
height : 70% ;
17
21
}
You can’t perform that action at this time.
0 commit comments