22 lines
631 B
Plaintext
22 lines
631 B
Plaintext
@inherits DComponentBase
|
|||
|
|
|
||
|
|
@* daisyUI Stack: https://daisyui.com/components/stack/ . The first child is on top; w-* and h-* on the stack make
|
||
|
|
all its children the same size. *@
|
||
|
|
<div @attributes="AdditionalAttributes" class="@CssClass">
|
||
|
|
@ChildContent
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@code {
|
||
|
|
[Parameter] public RenderFragment ChildContent { get; set; }
|
||
|
|
[Parameter] public DStackPlacement Placement { get; set; }
|
||
|
|
|
||
|
|
string CssClass => Cx("stack", PlacementClass, Class);
|
||
|
|
|
||
|
|
string PlacementClass => Placement switch
|
||
|
|
{
|
||
|
|
DStackPlacement.Top => "stack-top",
|
||
|
|
DStackPlacement.Start => "stack-start",
|
||
|
|
DStackPlacement.End => "stack-end",
|
||
|
|
_ => null
|
||
|
|
};
|
||
|
|
}
|