diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/FileInput/BitFileInput.razor b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/FileInput/BitFileInput.razor new file mode 100644 index 0000000000..827f25fe96 --- /dev/null +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/FileInput/BitFileInput.razor @@ -0,0 +1,82 @@ +@namespace Bit.BlazorUI +@inherits BitComponentBase + +
+ + @if (LabelTemplate is not null) + { + @LabelTemplate + } + else if (HideLabel is false) + { + + } + + + + @if (Files is not null && HideFileList is false) + { +
+ @for (var i = 0; i < Files.Count; i++) + { + var index = i; + var file = Files[index]; + file.Index = index; + + if (HideFileList is false) + { + if (FileViewTemplate is not null) + { + @FileViewTemplate(file) + } + else + { +
+
+
+
+ @file.Name +
+
+
+ + @FileSizeHumanizer.Humanize(file.Size) + +
+ @if (file.IsValid is false) + { +
+ @file.Message +
+ } +
+ @if (ShowRemoveButton) + { +