art-toast
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

Art Toast

Art Toast is an easy-to-use library.

DEMO: coming soon

Install

npm install art-toast

font-awesome is a necessary dependency for icons

npm i font-awesome@4.7.0

Setup

1: Add font-awesome to angular.json

{
    ...
    "styles": [
	    "node_modules/font-awesome/css/font-awesome.min.css"
    ]
}

2: Add the module to app.module.ts

import { ArtToastModule } from  'art-toast';

@NgModule({
declarations: [
    ...
],
imports: [
    ...,
    ArtToastModule
],
providers: [...],
})

3: Add in app.component.html

<art-toast></art-toast>

Using

import { Component } from  '@angular/core';
import { ArtToastService } from  'art-toast';

@Component({...})
export  class  AppComponent {
	constructor(private  artToastService: ArtToastService) { }
	showToast() {
		this.artToastService.success('title', 'description', {
		showButtonClose:  true,
		timer:  2000
		});
	}
}

Package Sidebar

Install

npm i art-toast

Weekly Downloads

12

Version

1.6.0

License

MIT

Unpacked Size

381 kB

Total Files

29

Last publish

Collaborators

  • aferreira