Extracted some pages to their own assembly and finished the artifact display page code
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
@if (File is not null)
|
||||
{
|
||||
<MudImage Fluid="true" Src="@File.Path" Alt="Swedish Farm House" Class="rounded-lg"/>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public required FilePathListing File { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the width of the image box while it loads
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public int Width { get; set; } = 600;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the height of the image box while it loads
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public int Height { get; set; } = 400;
|
||||
|
||||
[Parameter]
|
||||
public string AltText { get; set; } = "";
|
||||
|
||||
protected override Task OnParametersSetAsync()
|
||||
{
|
||||
if (File is not null || !string.IsNullOrEmpty(AltText))
|
||||
{
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
return base.OnParametersSetAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user