-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathNavItemBadge.razor
More file actions
36 lines (32 loc) · 1.24 KB
/
NavItemBadge.razor
File metadata and controls
36 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@namespace LumexUI.Docs.Client.Components
@if( Status.HasValue )
{
<LumexChip Size="@Size.Small"
Radius="@Radius.Full"
Variant="@ChipVariant.Flat"
Classes="@Classes">
@Status.ToString()
</LumexChip>
}
@code {
[Parameter] public PageStatus? Status { get; set; }
private ChipSlots Classes => new()
{
Base = new ElementClass()
.Add( "h-4" )
.Add( "ring" )
.Add( _variants[Status!.Value] ),
Content = new ElementClass()
.Add( "uppercase" )
.Add( "text-[10px]" )
.Add( "font-medium" )
.Add( "leading-none" )
};
private static readonly Dictionary<PageStatus, string> _variants = new()
{
[PageStatus.New] = "bg-orange-400/15 ring-orange-300 text-orange-600 dark:ring-orange-300/60 dark:text-orange-200",
[PageStatus.Soon] = "bg-teal-400/15 ring-teal-300 text-teal-600 dark:ring-teal-300/60 dark:text-teal-200",
[PageStatus.Preview] = "bg-indigo-400/15 ring-indigo-200 text-indigo-600 dark:ring-indigo-300/60 dark:text-indigo-200",
[PageStatus.Updated] = "bg-zinc-400/15 ring-zinc-300 text-zinc-500 dark:ring-zinc-300/60 dark:text-zinc-300",
};
}