alert.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import { EventEmitter, Renderer2, ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
  2. import { NgbAlertConfig } from './alert-config';
  3. /**
  4. * Alert is a component to provide contextual feedback messages for user.
  5. *
  6. * It supports several alert types and can be dismissed.
  7. */
  8. export declare class NgbAlert implements OnInit, OnChanges {
  9. private _renderer;
  10. private _element;
  11. /**
  12. * If `true`, alert can be dismissed by the user.
  13. *
  14. * The close button (×) will be displayed and you can be notified
  15. * of the event with the `(close)` output.
  16. */
  17. dismissible: boolean;
  18. /**
  19. * Type of the alert.
  20. *
  21. * Bootstrap provides styles for the following types: `'success'`, `'info'`, `'warning'`, `'danger'`, `'primary'`,
  22. * `'secondary'`, `'light'` and `'dark'`.
  23. */
  24. type: string;
  25. /**
  26. * An event emitted when the close button is clicked. It has no payload and only relevant for dismissible alerts.
  27. */
  28. close: EventEmitter<void>;
  29. constructor(config: NgbAlertConfig, _renderer: Renderer2, _element: ElementRef);
  30. closeHandler(): void;
  31. ngOnChanges(changes: SimpleChanges): void;
  32. ngOnInit(): void;
  33. }