@inherits DComponentBase
@* daisyUI Aura: https://daisyui.com/components/aura/ . ChildContent must be exactly one element (a btn, card, …).
The light takes the text colour (Color, or any text-* in Class); a bg-* sets its background and duration-* its
speed. daisyUI advises at most one aura per page. *@
@ChildContent
@code {
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public DAuraVariant Variant { get; set; }
/// Colour of the light, as text-*; the child inherits it unless it sets its own text colour.
[Parameter] public DColor Color { get; set; }
[Parameter] public DSize Size { get; set; }
string CssClass => Cx("aura", VariantClass, ColorClass, SizeClass, Class);
string VariantClass => Variant switch
{
DAuraVariant.Dual => "aura-dual",
DAuraVariant.Rainbow => "aura-rainbow",
DAuraVariant.Holo => "aura-holo",
DAuraVariant.Gold => "aura-gold",
DAuraVariant.Silver => "aura-silver",
DAuraVariant.Glow => "aura-glow",
_ => null
};
string ColorClass => Color switch
{
DColor.Neutral => "text-neutral",
DColor.Primary => "text-primary",
DColor.Secondary => "text-secondary",
DColor.Accent => "text-accent",
DColor.Info => "text-info",
DColor.Success => "text-success",
DColor.Warning => "text-warning",
DColor.Error => "text-error",
_ => null
};
string SizeClass => Size switch
{
DSize.Xs => "aura-xs",
DSize.Sm => "aura-sm",
DSize.Lg => "aura-lg",
DSize.Xl => "aura-xl",
_ => null
};
}