forked from LumexUI/lumexui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.cs
More file actions
54 lines (43 loc) · 1.27 KB
/
User.cs
File metadata and controls
54 lines (43 loc) · 1.27 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) LumexUI 2024
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE
using System.Diagnostics.CodeAnalysis;
using LumexUI.Utilities;
using TailwindMerge;
namespace LumexUI.Styles;
[ExcludeFromCodeCoverage]
internal static class User
{
private static ComponentVariant? _variant;
public static ComponentVariant Style( TwMerge twMerge )
{
var twVariants = new TwVariants( twMerge );
return _variant ??= twVariants.Create( new VariantConfig()
{
Slots = new SlotCollection
{
[nameof(UserSlots.Base)] = new ElementClass()
.Add( "inline-flex" )
.Add( "items-center" )
.Add( "justify-center" )
.Add( "gap-2" )
.Add( "rounded-small" )
.Add( "outline-solid" )
.Add( "outline-transparent" ),
[nameof(UserSlots.Wrapper)] = "inline-flex flex-col items-start",
[nameof(UserSlots.Name)] = "text-small text-inherit",
[nameof(UserSlots.Description)] = "text-tiny text-foreground-400",
},
Variants = new VariantCollection
{
[nameof(LumexUser.IsFocusable)] = new VariantValueCollection
{
[bool.TrueString] = new SlotCollection
{
[nameof(UserSlots.Base)] = Utils.FocusVisible,
}
}
}
} );
}
}