Vibe deck improvements
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
@namespace Shared.Components
|
||||
|
||||
<div class="mana-curve">
|
||||
@foreach (var entry in Distribution)
|
||||
{
|
||||
var height = MaxCount > 0 ? (entry.Count * 100 / MaxCount) : 0;
|
||||
<div class="mana-bar-container">
|
||||
<div class="mana-bar-label">@entry.Count</div>
|
||||
<div class="mana-bar" style="height: @($"{Math.Max(height, 5)}%")"></div>
|
||||
<div class="mana-cost">@(entry.Cost >= MaxCostLabel ? $"{MaxCostLabel}+" : entry.Cost.ToString())</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired] public List<(int Cost, int Count)> Distribution { get; set; } = [];
|
||||
[Parameter] public int MaxCostLabel { get; set; } = 10;
|
||||
|
||||
private int MaxCount => Distribution.Count > 0 ? Distribution.Max(x => x.Count) : 0;
|
||||
}
|
||||
Reference in New Issue
Block a user