File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- namespace Avolutions . Baf . Blazor . Tabs . Abstractions ;
1+ using MudBlazor ;
2+
3+ namespace Avolutions . Baf . Blazor . Tabs . Abstractions ;
24
35public interface IBafTab
46{
57 string Title { get ; }
68 object ? BadgeData { get ; }
9+ Color BadgeColor { get ; }
710 Task OnActivatedAsync ( ) ;
811 Task OnAddedAsync ( ) ;
912}
Original file line number Diff line number Diff line change 1212 Border =" true" >
1313 @foreach ( var tab in _tabs )
1414 {
15- <MudTabPanel Text =" @tab.Title" BadgeData =" @tab.BadgeData" >
15+ <MudTabPanel Text =" @tab.Title" BadgeData =" @tab.BadgeData" BadgeColor = " @tab.BadgeColor " >
1616 @tab.Content
1717 </MudTabPanel >
1818 }
2929 {
3030 public string Title { get ; set ; } = string .Empty ;
3131 public object ? BadgeData { get ; set ; }
32+ public Color BadgeColor { get ; set ; } = Color .Primary ;
3233 public RenderFragment Content { get ; set ; } = null ! ;
3334 public IBafTab TabInstance { get ; set ; } = null ! ;
3435 }
4647 {
4748 Title = title ,
4849 BadgeData = tabInstance .BadgeData ,
50+ BadgeColor = tabInstance .BadgeColor ,
4951 Content = content ,
5052 TabInstance = tabInstance
5153 });
Original file line number Diff line number Diff line change 11using Avolutions . Baf . Blazor . Tabs . Abstractions ;
22using Avolutions . Baf . Blazor . Tabs . Components ;
33using Microsoft . AspNetCore . Components ;
4+ using MudBlazor ;
45
56namespace Avolutions . Baf . Blazor . Tabs . Models ;
67
@@ -12,6 +13,7 @@ public abstract class BafTab : ComponentBase, IBafTab
1213 public abstract string Title { get ; }
1314
1415 public virtual object ? BadgeData => null ;
16+ public virtual Color BadgeColor => Color . Primary ;
1517
1618 protected override async Task OnInitializedAsync ( )
1719 {
You can’t perform that action at this time.
0 commit comments