mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-19 15:18:02 -04:00
32 lines
777 B
Plaintext
32 lines
777 B
Plaintext
@inherits ComponentBase
|
|
|
|
<span class="@PillClass px-2 py-1 text-xs font-medium rounded-full">
|
|
@StatusText
|
|
</span>
|
|
|
|
@code {
|
|
/// <summary>
|
|
/// Set to true to show the pill as enabled.
|
|
/// </summary>
|
|
[Parameter]
|
|
public bool Enabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// The text to show when the pill is enabled.
|
|
/// </summary>
|
|
[Parameter]
|
|
public string TextTrue { get; set; } = "Enabled";
|
|
|
|
/// <summary>
|
|
/// The text to show when the pill is disabled.
|
|
/// </summary>
|
|
[Parameter]
|
|
public string TextFalse { get; set; } = "Disabled";
|
|
|
|
private string PillClass => Enabled
|
|
? "bg-green-100 text-green-800"
|
|
: "bg-red-100 text-red-800";
|
|
|
|
private string StatusText => Enabled ? TextTrue : TextFalse;
|
|
}
|