24 lines
814 B
Plaintext
24 lines
814 B
Plaintext
@inherits DComponentBase
|
|||
|
|
|
||
|
|
@* daisyUI Text rotate: https://daisyui.com/components/text-rotate/ . Loops through 2-6 lines, one at a time, pausing on
|
||
|
|
hover. The lines are Items, or <span> children in ChildContent (for per-line classes). Set the loop time with a
|
||
|
|
duration-* in Class (default 10s). *@
|
||
|
|
<span @attributes="AdditionalAttributes" class="@Cx("text-rotate", Class)">
|
||
|
|
<span class="@(Centered ? "justify-items-center" : null)">
|
||
|
|
@if (Items is not null)
|
||
|
|
{
|
||
|
|
foreach (var item in Items.Take(6))
|
||
|
|
{
|
||
|
|
<span>@item</span>
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@ChildContent
|
||
|
|
</span>
|
||
|
|
</span>
|
||
|
|
|
||
|
|
@code {
|
||
|
|
[Parameter] public IEnumerable<string> Items { get; set; }
|
||
|
|
[Parameter] public RenderFragment ChildContent { get; set; }
|
||
|
|
/// <summary>Centre the lines horizontally.</summary>
|
||
|
|
[Parameter] public bool Centered { get; set; }
|
||
|
|
}
|