Skip to content

Commit

Permalink
feat: Adds css class to all helper componets (header/body/footer)
Browse files Browse the repository at this point in the history
  • Loading branch information
stavroskasidis committed Nov 5, 2021
1 parent d111349 commit 391e26d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion BlazorDialog/Components/DialogBody.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@namespace BlazorDialog
<div class="blazor-dialog-body">
<div class="blazor-dialog-body @CssClass">
@ChildContent
</div>

@code{

[Parameter] public RenderFragment ChildContent { get; set; }

[Parameter] public string CssClass { get; set; }
}
3 changes: 2 additions & 1 deletion BlazorDialog/Components/DialogFooter.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@namespace BlazorDialog
<div class="blazor-dialog-footer">
<div class="blazor-dialog-footer @CssClass">
@ChildContent
</div>

@code{
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public string CssClass { get; set; }
}
3 changes: 2 additions & 1 deletion BlazorDialog/Components/DialogHeader.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@namespace BlazorDialog
<div class="blazor-dialog-header">
<div class="blazor-dialog-header @CssClass" >
<div class="blazor-dialog-title">@ChildContent</div>
@if (ShowClose)
{
Expand All @@ -12,6 +12,7 @@
@code{
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public bool ShowClose { get; set; } = false;
[Parameter] public string CssClass { get; set; }
[CascadingParameter(Name = "ParentDialog")] Dialog Dialog { get; set; }

private async Task OnCloseClick()
Expand Down

0 comments on commit 391e26d

Please sign in to comment.