progress-bar.component.ts 535 B

1234567891011121314151617181920212223
  1. import { Component, Input } from '@angular/core';
  2. import { CommonModule } from '@angular/common';
  3. export interface ProgressSection {
  4. key: string;
  5. label: string;
  6. }
  7. @Component({
  8. selector: 'app-progress-bar',
  9. standalone: true,
  10. imports: [CommonModule],
  11. templateUrl: './progress-bar.component.html',
  12. styles: [`
  13. :host {
  14. display: block;
  15. }
  16. `]
  17. })
  18. export class ProgressBarComponent {
  19. @Input() sections: ProgressSection[] = [];
  20. @Input() getSectionStatus!: (key: string) => 'completed' | 'active' | 'pending';
  21. }