Skip to content

Commit d82f05c

Browse files
committed
refactor: improve test site examples
1 parent c07ecfe commit d82f05c

File tree

4 files changed

+41
-7
lines changed

4 files changed

+41
-7
lines changed

src/Umbraco.Community.SimpleTrees.TestSite/ViewComponents/ExampleItemViewComponent.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ public class ExampleItemViewComponent : SimpleTreeViewComponent
88
{
99
public override IViewComponentResult Invoke(SimpleTreeViewModel model)
1010
{
11-
return Content($"Hello {model.Unique} {model.EntityType} {DateTime.UtcNow:HH:mm:ss}");
11+
return Content($"""
12+
<uui-box>
13+
Hello {model.Unique} {model.EntityType} {DateTime.UtcNow:HH:mm:ss}
14+
</uui-box>
15+
"""
16+
);
1217
}
1318
}

src/Umbraco.Community.SimpleTrees.TestSite/ViewComponents/ExampleRootViewComponent.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ public class ExampleRootViewComponent : SimpleTreeViewComponent
88
{
99
public override IViewComponentResult Invoke(SimpleTreeViewModel model)
1010
{
11-
return Content($"Hello {model.Unique} {model.EntityType} {DateTime.UtcNow:HH:mm:ss}");
11+
return Content($"""
12+
<uui-box headline="This is my custom tree item">
13+
Hello {model.Unique} {model.EntityType} {DateTime.UtcNow:HH:mm:ss}
14+
</uui-box>
15+
"""
16+
);
1217
}
1318
}
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
@inherits Umbraco.Community.SimpleTrees.Web.SimpleTreeViewPage
22

3-
<uui-box headline="This is my custom tree item">
3+
<uui-box headline="This is a custom tree item">
44
<div>
5-
@Model.Unique - @Model.EntityType
5+
<table>
6+
<thead>
7+
<tr>
8+
<th>Entity Type</th>
9+
<th>Unique</th>
10+
</tr>
11+
</thead>
12+
<tbody>
13+
<tr>
14+
<td>@Model.EntityType</td>
15+
<td>@Model.Unique</td>
16+
</tr>
17+
</table>
618
</div>
7-
</uui-box>
19+
</uui-box>
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
@inherits Umbraco.Community.SimpleTrees.Web.SimpleTreeViewPage
22

3-
<uui-box headline="This is my custom tree">
3+
<uui-box headline="This is a custom tree item">
44
<div>
5-
@Model.Unique - @Model.EntityType
5+
<table>
6+
<thead>
7+
<tr>
8+
<th>Entity Type</th>
9+
<th>Unique</th>
10+
</tr>
11+
</thead>
12+
<tbody>
13+
<tr>
14+
<td>@Model.EntityType</td>
15+
<td>@Model.Unique</td>
16+
</tr>
17+
</table>
618
</div>
719
</uui-box>

0 commit comments

Comments
 (0)