@inherits DComponentBase @* daisyUI Loading: https://daisyui.com/components/loading/ . It is drawn in currentColor, so Color maps to text-* classes. role="status" and aria-label come before the splatted attributes, so a consumer can override them. *@ @code { [Parameter] public DLoadingVariant Variant { get; set; } [Parameter] public DSize Size { get; set; } [Parameter] public DColor Color { get; set; } /// What screen readers announce (aria-label). [Parameter] public string LabelText { get; set; } = "Loading"; string CssClass => Cx("loading", VariantClass, SizeClass, ColorClass, Class); string VariantClass => Variant switch { DLoadingVariant.Dots => "loading-dots", DLoadingVariant.Ring => "loading-ring", DLoadingVariant.Ball => "loading-ball", DLoadingVariant.Bars => "loading-bars", DLoadingVariant.Infinity => "loading-infinity", _ => null }; string SizeClass => Size switch { DSize.Xs => "loading-xs", DSize.Sm => "loading-sm", DSize.Lg => "loading-lg", DSize.Xl => "loading-xl", _ => 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 }; }