0.0.2 • Published 6 years ago

lbd v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

LBD

UI Components for Angular

Installation

Use the package manager npm to install lbd component library.

npm install lbd

Setup

Import the prebuilt cdk overlay styles in your global stylesheet:

@import '~@angular/cdk/overlay-prebuilt.css';

Toast

...
import { ToastModule } from 'lbd';

@NgModule({
  imports: [
    ...
    ToastModule.forRoot() // pass your global toast configuration here
  ],
  ...
})
import { ToastService } from 'lbd';


@Component({...})
export class SampleComponent {
  constructor(private toastService: ToastService) {}

  showToast() {
    this.toastService.show({
      text: 'Your text',
      type: 'success' // warning, error, info
    });
  }
}
// default configuration:
position: {
    top: 10,
    right: 5,
},
size: {
    width: 350
},
animation: {
    fadeOut: 120,
    fadeIn: 120,
},
color: {
    success: '#51a351',
    error: '#bd362f',
    warning: '#e38705',
    info: '#2f96b4',
},
showProgress: true

License

MIT