Iceshrimp.NET/Iceshrimp.Frontend/Components/Note/NoteAttachments.razor
2024-07-04 18:02:00 +02:00

18 lines
No EOL
563 B
Text

@using Iceshrimp.Shared.Schemas.Web
<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();
}
}