Iceshrimp.NET/Iceshrimp.Frontend/Components/Note/NoteAttachments.razor

19 lines
No EOL
561 B
Text

@using Iceshrimp.Shared.Schemas
<div class="attachment-container">
@foreach (var element in Attachments)
{
<AttachmentComponent Attachment="element" OnOpen="Open" />
}
<AttachmentView @ref="View" Attachments="Attachments"></AttachmentView>
</div>
@code {
[Parameter] [EditorRequired] public required IList<NoteAttachment> Attachments { get; set; }
private AttachmentView View { get; set; } = null!;
private async void Open()
{
await View.OpenDialog();
}
}