Skip to content

Commit

Permalink
Merge pull request #8 from stavroskasidis/release/1.4
Browse files Browse the repository at this point in the history
Release/1.4
  • Loading branch information
stavroskasidis authored Nov 5, 2021
2 parents 68ec007 + 1026f57 commit e0c5e9e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BlazorDialog/BlazorDialog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Copyright />
<PackageTags>blazor blazor-component blazor-dialog dialog modal blazor-modal blazordialog blazormodaldialog blazormodal razor razor-components razorcomponents</PackageTags>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<Version>1.3.0</Version>
<Version>1.4.0</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<Product>BlazorDialog</Product>
</PropertyGroup>
Expand Down
7 changes: 6 additions & 1 deletion BlazorDialog/Components/Dialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<CascadingValue Value="this.Input" Name="DialogInput">
@if (!IsCustom)
{
<div class="blazor-dialog-container @(Centered ? "blazor-dialog-centered" : "")" style="z-index:@(BaseZIndex + dialogDepth)">
<div class="blazor-dialog-container @CssClass @(Centered ? "blazor-dialog-centered" : "")" style="z-index:@(BaseZIndex + dialogDepth)">
<div class="blazor-dialog-content-wrapper @ContentWrapperCssClass @AnimationCssClass">
<div class="blazor-dialog-content">
@ChildContent
Expand Down Expand Up @@ -89,6 +89,11 @@
/// </summary>
[Parameter] public bool IsCustom { get; set; }

/// <summary>
/// Adds a custom css class to the wrapper of the dialog.
/// </summary>
[Parameter] public string CssClass { get; set; }

protected TaskCompletionSource<object> taskCompletionSource;
internal Action<object> OnDialogHide;
protected void NotifyDialogHidden(object result) => OnDialogHide?.Invoke(result);
Expand Down
4 changes: 2 additions & 2 deletions BlazorDialog/wwwroot/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@
}

.blazor-dialog-content-wrapper-windowed{
max-height:100%;
max-height:90%;
overflow: auto;
}

@media (min-width: 576px) {
.blazor-dialog-content-wrapper-normal {
max-width: 500px;
margin: 2.75rem auto;
/*margin: 2.75rem auto;*/
}
}

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ Make sure that there is a call to `app.UseStaticFiles();` in your server project
## Release Notes

<details open="open"><summary>1.3</summary>
<details open="open"><summary>1.4</summary>

>- Added css class parameter to dialog component.
</details>
<details><summary>1.3</summary>

>- Added base z-index parameter to dialog component.
</details>
Expand Down
2 changes: 1 addition & 1 deletion TestApps/BlazorDialog.TestAppsCommon/IndexCommon.razor
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<option value="@DialogAnimation.Zoom">@DialogAnimation.Zoom</option>
<option value="@DialogAnimation.FadeIn">@DialogAnimation.FadeIn</option>
</select>
<Dialog Id="simple-large-dialog" Size="size" Centered="isCentered" Animation="animation">
<Dialog Id="simple-large-dialog" Size="size" Centered="isCentered" Animation="animation" CssClass="custom-class">
<DialogInputProvider TInput="string">
<DialogHeader ShowClose="true">
<h4>@context.Input</h4>
Expand Down

0 comments on commit e0c5e9e

Please sign in to comment.