Iceshrimp.NET/Iceshrimp.Frontend/Components/Note/NoteAttachments.razor
2024-06-29 00:48:53 +02:00

18 lines
No EOL
559 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();
}
}