Skip to content

Commit

Permalink
fix(module: alert): make description element visible if passed in Chi…
Browse files Browse the repository at this point in the history
…ldContent (#881)

* fix(module: alert): make description element visible if passed in ChildContent (#875)

* docs(module: alert): modified example - instead of Description parameter ChildContent is used (#875)
  • Loading branch information
szmalec committed Dec 12, 2020
1 parent b7684d1 commit 2597fc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/alert/Alert.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void SetClassMap()
.If($"{prefixName}-no-icon", () => !ShowIcon)
.If($"{prefixName}-closable", () => Closable)
.If($"{prefixName}-banner", () => Banner)
.If($"{prefixName}-with-description", () => !string.IsNullOrEmpty(Description))
.If($"{prefixName}-with-description", () => !string.IsNullOrEmpty(Description) || ChildContent != null)
.If($"{prefixName}-motion", () => _isClosing)
.If($"{prefixName}-motion-leave", () => _isClosing)
.If($"{prefixName}-motion-leave-active", () => _isClosing && _motionStage == 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Type="@AlertType.Success" />

<Alert Message="Info Text"
Description="Info Description Info Description Info Description Info Description"
Type="@AlertType.Info" />
Type="@AlertType.Info">
Info Description Info Description Info Description Info Description
</Alert>

<Alert Message="Warning Text"
Description="Warning Description Warning Description Warning Description Warning Description"
Expand Down

0 comments on commit 2597fc9

Please sign in to comment.