Add IsValueLink to CardListItemProperty

This commit is contained in:
Ivan Yaremenchuk 2022-09-18 20:28:37 -05:00
parent 61b9ef8dbe
commit b970a20de2
3 changed files with 12 additions and 1 deletions

View File

@ -36,7 +36,16 @@
{
var namePart = property.Name != null ? $"{property.Name}: " : string.Empty;
var valueStyle = property.ValueColor != null ? $"color: {property.ValueColor}" : string.Empty;
<div style="font-size: .8em">@namePart<text style="@valueStyle">@property.Value</text></div>
<div style="font-size: .8em">@namePart<text style="@valueStyle">
@if (property.IsValueLink)
{
<RadzenLink Icon="open_in_new" Path="@property.Value" Text="@property.Value" Target="_blank" />
}
else
{
@property.Value
}
</text></div>
}
}
<div>

View File

@ -5,4 +5,5 @@ public class CardListItemProperty
public string Name { get; set; }
public string Value { get; set; }
public string ValueColor { get; set; }
public bool IsValueLink { get; set; }
}

View File

@ -38,6 +38,7 @@ public partial class UploadLocationsPage : BasicComponent
{
Name = "Location",
Value = uploadLocation.Location,
IsValueLink = true,
},
new CardListItemProperty
{