Skip to content

Commit

Permalink
Add spacing around StatusMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Nov 8, 2023
1 parent 80c1253 commit bfc48a6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion MyApp/Components/Identity/StatusMessage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@if (!string.IsNullOrEmpty(message))
{
<div class="alert">
<div class="@CssUtils.ClassNames("alert", @class)">
@if (message.StartsWith("Error"))
{
<div class="rounded-md bg-red-50 dark:bg-red-900 p-4">
Expand Down Expand Up @@ -58,6 +58,8 @@
@code {
[Parameter]
public string? Message { get; set; }
[Parameter]
public string? @class { get; set; }

[CascadingParameter]
private HttpContext HttpContext { get; set; } = default!;
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/ExternalLogin.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PageTitle>Register</PageTitle>

<div class="mt-8 mx-auto max-w-lg">
<StatusMessage Message="@_message" />
<StatusMessage class="mb-3" Message="@_message" />
<h1 class="@Css.H1">Register</h1>
<h2 class="@Css.H2" id="external-login-title">Associate your @providerDisplayName account.</h2>

Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h1 class="mb-3 @Css.H1">
Use a local account to log in.
</h1>
<StatusMessage Message="@errorMessage" />
<StatusMessage class="mb-3" Message="@errorMessage" />
<section class="mt-4 sm:shadow overflow-hidden sm:rounded-md">
<EditForm id="account" Model="Input" method="post" OnValidSubmit="LoginUser" FormName="login">
<div class="px-4 bg-white dark:bg-black sm:p-6">
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/Manage/EnableAuthenticator.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ else
<h3 class="@Css.H3">Configure authenticator app</h3>

<div class="max-w-xl" data-module="pages/Account/Manage/EnableAuthenticator.mjs">
<StatusMessage />
<StatusMessage class="mb-3" />
<div>
<p>To use an authenticator app go through the following steps:</p>
<ol class="list-decimal ml-8">
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/Manage/ExternalLogins.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PageTitle>Manage your external logins</PageTitle>

<div class="max-w-xl">
<StatusMessage />
<StatusMessage class="mb-3" />
@if (_currentLogins?.Count > 0)
{
<h3 class="@Css.H3">Registered Logins</h3>
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/Manage/SetPassword.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h3 class="@Css.H3">Set your password</h3>

<div class="max-w-xl">
<StatusMessage Message="@_message" />
<StatusMessage class="mb-3" Message="@_message" />

<p class="text-info">
You do not have a local username/password for this site. Add a local
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/Manage/TwoFactorAuthentication.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h3 class="@Css.H3">Two-factor authentication (2FA)</h3>

<div class="max-w-xl">
<StatusMessage />
<StatusMessage class="mb-3" />

@if (_consentFeature?.CanTrack ?? true)
{
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Pages/Account/ResendEmailConfirmation.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h1 class="mb-3 @Css.H1">Resend email confirmation</h1>
<h3 class="@Css.H3">Enter your email.</h3>

<StatusMessage Message="@_message" />
<StatusMessage class="mb-3" Message="@_message" />
<EditForm Model="Input" FormName="resend-email-confirmation" OnValidSubmit="OnValidSubmitAsync" method="post">
<DataAnnotationsValidator />
<ValidationSummary class="@Css.ValidationSummary" />
Expand Down

0 comments on commit bfc48a6

Please sign in to comment.