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

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i lbd

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

271 kB

Total Files

38

Last publish

Collaborators

  • rbnlbd