page-header.component.html 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. <div class="grid grid-cols-[1fr_auto_1fr] items-center gap-4 px-6 py-4 border-b border-surface-200 dark:border-surface-300 bg-white dark:bg-surface-100">
  2. <div class="flex items-center gap-3 min-w-0">
  3. @if (icon) {
  4. <div class="w-9 h-9 rounded-lg bg-primary-50 dark:bg-primary-50/20 text-primary-600 dark:text-primary-400 flex items-center justify-center shrink-0">
  5. <fa-icon [icon]="icon" size="lg" />
  6. </div>
  7. }
  8. <div class="min-w-0">
  9. <h1 class="text-lg font-bold text-surface-900 dark:text-surface-900">{{ title }}</h1>
  10. @if (subtitle) {
  11. <p class="text-sm text-surface-500 dark:text-surface-500 mt-0.5 truncate">{{ subtitle }}</p>
  12. }
  13. </div>
  14. </div>
  15. <div class="justify-self-center">
  16. <ng-content select="[headerCenter]" />
  17. </div>
  18. <div class="flex items-center gap-3 justify-self-end">
  19. <ng-content select="[headerActions]" />
  20. @if (showAction && actionLabel) {
  21. <button
  22. (click)="action.emit()"
  23. class="inline-flex items-center gap-2 px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors"
  24. >
  25. @if (actionIcon) {
  26. <fa-icon [icon]="actionIcon" size="sm" />
  27. }
  28. {{ actionLabel }}
  29. </button>
  30. }
  31. </div>
  32. </div>