Skip to content

Commit

Permalink
[MessageBar] Supply a default value for the message intent whne using…
Browse files Browse the repository at this point in the history
… MessageOptions (microsoft#1993)
  • Loading branch information
vnbaaij authored May 1, 2024
1 parent 0a249a0 commit fd8442e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Core/Components/MessageBar/Message.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// ------------------------------------------------------------------------
// MIT License - Copyright (c) Microsoft Corporation. All rights reserved.
// ------------------------------------------------------------------------

namespace Microsoft.FluentUI.AspNetCore.Components;

/// <summary />
Expand All @@ -24,7 +28,7 @@ internal Message(MessageOptions options)
/// Default is MessageIntent.Info.
/// See <see cref="MessageIntent"/> for more details.
/// </summary>
public MessageIntent? Intent => Options.Intent;
public MessageIntent? Intent => Options.Intent ?? MessageIntent.Info;

/// <summary>
/// Indication of in which message bar the message needs to be shown. Default is null.
Expand Down

0 comments on commit fd8442e

Please sign in to comment.