Skip to content
Snippets Groups Projects
Select Git revision
  • 2a735415fffde5f10f5841844fee1f895f6813cf
  • main default protected
  • OZG-8073-date-component
  • OZG-7856_schadcode_scanner
  • OZG-7985-Statistik-Datenfreigabe
  • OZG-8305-Create-webpack-sbom
  • tooltip-improvements
  • ods-remove-class-inputs
  • release-info
  • release-administration
  • release
  • OZG-7714-UpgradeKeycloakDependencyTo25
  • OZG-8086-Admin-Datenanfrage-erstellen
  • OZG-8086-Datenanfrage-Umbenennung
  • mongodb-7-0-16-e2e
  • OZG-6220-Bescheid-speichern-ohne-Postfach
  • OZG-7922-KeycloakOperatorExceptions
  • OZG-8142-poc-cards
  • OZG-8086-E2E
  • OZG-8086-E2E2
  • OZG-8142-ProjectionStuff
  • 1.11.0-info
  • 1.11.0-administration
  • 2.26.0-alfa
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
  • 1.6.0-administration
  • 2.21.0-alfa
  • 1.5.0-info
  • 1.5.0-administration
41 results

attachment.component.ts

Blame
  • attachment.component.ts 1.20 KiB
    import { CommonModule } from '@angular/common';
    import { Component, Input } from '@angular/core';
    
    import { FileIconComponent } from '../icons/file-icon/file-icon.component';
    import { SpinnerIconComponent } from '../icons/spinner-icon/spinner-icon.component';
    
    @Component({
      selector: 'ods-attachment',
      standalone: true,
      imports: [CommonModule, SpinnerIconComponent, FileIconComponent],
      styles: [':host {@apply flex border-b border-black/25 last:border-b-0}'],
      template: `<button
        class="relative flex w-full gap-3 rounded-md border bg-background-100 px-3 py-2 last:border-none hover:bg-ozggray-200"
      >
        <div class="flex-shrink">
          <ods-file-icon *ngIf="!isLoading" [fileType]="fileType" size="large" />
          <ods-spinner-icon *ngIf="isLoading" size="lg" />
        </div>
        <div class="flex grow flex-col items-start break-all text-text">
          <p class="text-start text-sm">{{ documentName }}</p>
          <p class="text-xs text-ozggray-600">{{ description }}</p>
        </div>
        <ng-content select="[close]"></ng-content>
      </button>`,
    })
    export class AttachmentComponent {
      @Input() documentName!: string;
      @Input() description = '';
      @Input() fileType!: string;
      @Input() isLoading: boolean = false;
    }