mhrj-angular-toast-scroll
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

MhrjAngularToastScroll

This package is for toast service in angular

How to use

first install the package using below npm command

npm i mhrj-angular-toast-scroll --save

import ToastScrollService from mhrj-angular-toast-scroll

import {ToastScrollService} from 'mhrj-angular-toast-scroll'

inject ToastScrollService in constructor of any component.

Like below :

constructor( private toast: MhrjToastService ) { }

then call raise function:

this.toast.raise()

parameters

The raise() function takes two optional parameters

1 message:string Message to be displayed

2 data:ToastConfig Toast configuration options

data parameter options

In data parameter we have following options to pass

1 message Message to be displayed

2 panelClass Css class to override display properties if given toastType is not applied

3 horizontalPosition Horizontal position of toast one of 'top' | 'bottom' defaults to 'top'

4 verticalPosition Vertical position of toast one of 'center' | 'left' | 'right' defaults to 'right'

5 toastType Type of toast to apply different backgrounds one of 'normal' | 'success' | 'error' | 'warning'

6 scrollFrom Define from which direction toast will enter one of 'top' | 'bottom' | 'left' | 'right' defaults to 'top'

7 scrollTo Define from which direction toast will exit one of 'top' | 'bottom' | 'left' | 'right' defaults to value of scrollFrom

Package Sidebar

Install

npm i mhrj-angular-toast-scroll

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

66.9 kB

Total Files

20

Last publish

Collaborators

  • maharaja