havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
475 stars 66 forks source link

Extend ThemeColorExtensions class with ToBorderColorCss and subtle/emphasis variants #745

Closed crdo closed 7 months ago

crdo commented 7 months ago

My motivation is to get an API of our a components from

<ReportAggregateValueWidget Icon="BootstrapIcon.DatabaseDown"
            BackgroundColor="@(_selectedSeriesIds.Contains((int)InvoicesReportSettingsModel.ReportValue.Costs) ? "rgba(var(--bs-danger-rgb), 0.05)" : null)"
            IconBackground="rgba(var(--bs-danger-rgb), 0.2)"
            IconColor="rgb(var(--bs-danger-rgb))" />

to

<ReportAggregateValueWidget Icon="BootstrapIcon.DatabaseDown"
            Color="ThemColor.Danger"
            Active="@(_selectedSeriesIds.Contains((int)InvoicesReportSettingsModel.ReportValue.Costs)" />

and then do the design work inside of the component with ThemeColorExtensions.