diff --git a/src/Money.Blazor.Host/Components/Title.razor b/src/Money.Blazor.Host/Components/Title.razor index 940bb268..9f1b823d 100644 --- a/src/Money.Blazor.Host/Components/Title.razor +++ b/src/Money.Blazor.Host/Components/Title.razor @@ -20,6 +20,8 @@ @ButtonText } + + @ButtonContent @if (!String.IsNullOrEmpty(Sub)) { diff --git a/src/Money.Blazor.Host/Components/Title.razor.cs b/src/Money.Blazor.Host/Components/Title.razor.cs index 034bc428..05104d62 100644 --- a/src/Money.Blazor.Host/Components/Title.razor.cs +++ b/src/Money.Blazor.Host/Components/Title.razor.cs @@ -27,5 +27,8 @@ public partial class Title [Parameter] public Action ButtonClick { get; set; } + + [Parameter] + public RenderFragment ButtonContent { get; set; } } } diff --git a/src/Money.Blazor.Host/Pages/Summary.razor b/src/Money.Blazor.Host/Pages/Summary.razor index 2f788569..ad2ab31b 100644 --- a/src/Money.Blazor.Host/Pages/Summary.razor +++ b/src/Money.Blazor.Host/Pages/Summary.razor @@ -1,6 +1,21 @@ @typeparam T - + + <ButtonContent> + <button class="btn btn-primary ml-2" @onclick="CreateNewExpense"> + <Icon Identifier="minus-circle" /> + <span class="d-none d-md-inline"> + New Expense + </span> + </button> + <button class="btn btn-primary ml-2"> + <Icon Identifier="plus-circle" /> + <span class="d-none d-md-inline"> + New Income + </span> + </button> + </ButtonContent> +