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 11< 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 >
44</ div >
5- < ejs-toast #toastObj [position] ='position ' [timeOut] ='5000 ' [showCloseButton] ="true " >
5+ < ejs-toast #toastObj [position] ='position ' [timeOut] ='500 ' [showCloseButton] ="false " >
66 <!-- <ng-template #title>
77 <div>Matt sent you a friend request</div>
88 </ng-template>
1313 < ng-template #template >
1414 < div id ='template_toast '>
1515 < 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; " >
1818 Weekend Alarm
1919 </ 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
2323 </ div >
2424 </ div >
2525 </ div >
2626 < img src ='https://ej2.syncfusion.com/demos/src/toast/resource/map.jpg ' />
2727 </ div >
2828 </ ng-template >
29- </ ejs-toast >
29+ </ ejs-toast >
Original file line number Diff line number Diff line change 11import { Component , ViewChild } from '@angular/core' ;
22import { RouterOutlet } from '@angular/router' ;
3- import { ToastModule } from '@syncfusion/ej2-angular-notifications'
3+ import { ToastModule , ToastComponent } from '@syncfusion/ej2-angular-notifications'
44import { ButtonModule } from '@syncfusion/ej2-angular-buttons' ;
55
66@Component ( {
77 selector : 'app-root' ,
88 standalone : true ,
9- imports : [ RouterOutlet , ToastModule , ButtonModule ] ,
9+ imports : [ RouterOutlet , ToastModule , ButtonModule ] ,
1010 templateUrl : './app.component.html' ,
1111 styleUrl : './app.component.css'
1212} )
1313export class AppComponent {
14- @ViewChild ( 'toastObj' ) public toastObj : any ;
15- public position = { X : 'Right' , Y : 'Top' } ;
14+ @ViewChild ( 'toastObj' ) public toastObj : ToastComponent ;
1615
17- onCreate ( args : any ) {
18- this . toastObj . show ( ) ;
19- }
16+ public position = { X : 'Right' , Y : 'Top' } ;
2017
21- showClick ( args : any ) {
18+ showToast ( args : any ) {
2219 this . toastObj . show ( ) ;
2320 }
2421
25- hideClick ( args : any ) {
22+ hideToast ( args : any ) {
2623 this . toastObj . hide ( 'All' ) ;
2724 }
28-
29-
3025}
Original file line number Diff line number Diff line change 44@import '../node_modules/@syncfusion/ej2-popups/styles/material.css' ;
55@import '../node_modules/@syncfusion/ej2-angular-notifications/styles/material.css' ;
66
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
1215}
1316
1417img {
18+ padding-bottom : 15px ;
1519 width : 100% ;
1620 height : 70% ;
1721}
You can’t perform that action at this time.
0 commit comments