Skip to content
Snippets Groups Projects
Commit 7601b2f4 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5698-OZG-5765 Add errorCaption to attachment

parent 190eec4f
Branches
Tags
No related merge requests found
......@@ -24,9 +24,12 @@ import { SpinnerIconComponent } from '../icons/spinner-icon/spinner-icon.compone
<ods-spinner-icon *ngIf="isLoading && !isError" size="large" />
</div>
<div class="flex grow flex-col items-start break-all text-start text-text">
<p class="text-sm" [ngClass]="isError && 'text-error'">
<p *ngIf="!isError && caption" class="text-sm">
{{ caption }}
</p>
<p *ngIf="isError && errorCaption" class="text-sm text-error">
{{ errorCaption }}
</p>
<p *ngIf="description && !isError" class="text-xs text-text/65">
{{ description }}
</p>
......@@ -38,7 +41,8 @@ import { SpinnerIconComponent } from '../icons/spinner-icon/spinner-icon.compone
</button>`,
})
export class AttachmentComponent {
@Input({ required: true }) caption!: string;
@Input() caption: string = '';
@Input() errorCaption: string = '';
@Input() fileType: string = '';
@Input() description = '';
@Input() isLoading: boolean = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment