forked from LumexUI/lumexui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.razor
More file actions
67 lines (55 loc) · 1.76 KB
/
User.razor
File metadata and controls
67 lines (55 loc) · 1.76 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
55
56
57
58
59
60
61
62
63
64
65
66
67
@page "/docs/components/user"
@layout DocsContentLayout
@using LumexUI.Docs.Client.Pages.Components.User.PreviewCodes
<DocsSection Title="Usage">
<Usage />
<DocsSection Title="Link Description">
<LinkDescription />
</DocsSection>
<LumexAlert Radius="@Radius.Large" Class="my-6">
<DescriptionContent>
When both <code>Description</code> and <code>DescriptionContent</code> are provided, <code>DescriptionContent</code> takes precedence.
</DescriptionContent>
</LumexAlert>
</DocsSection>
<DocsSlotsSection Slots="@_slots">
<div>
<h4 class="font-semibold">User</h4>
<ul>
<li><code>Class</code>: The basic CSS class name styles the wrapper of the user contents.</li>
<li><code>Classes</code>: The CSS class names for the user slots style the entire user at once.</li>
</ul>
</div>
</DocsSlotsSection>
<DocsApiSection Components="@_apiComponents" />
@code {
[CascadingParameter] private DocsContentLayout Layout { get; set; } = default!;
private readonly Heading[] _headings = new Heading[]
{
new("Usage", [
new("Link Description")
]),
new("API")
};
private readonly Slot[] _slots = new Slot[]
{
new(nameof( UserSlots.Base ), "The base slot of the user, it is the main container."),
new(nameof( UserSlots.Wrapper ), "The name and description wrapper."),
new(nameof( UserSlots.Name ), "The name of the user."),
new(nameof( UserSlots.Description ), "The description of the user."),
};
private readonly string[] _apiComponents = new string[]
{
nameof(LumexUser)
};
protected override void OnInitialized()
{
Layout.Initialize(
title: "User",
category: "Components",
description: "Display user information with avatar and name.",
headings: _headings,
linksProps: new ComponentLinksProps("Usr", isServer: true)
);
}
}