Skip to content

Commit 3c4cd59

Browse files
committed
Chore: Update sample
1 parent cf4dead commit 3c4cd59

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

demo/StaticSample/StaticSample.Client/Pages/Home.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<MudText Typo="Typo.h5" GutterBottom="true">Interactivity in this Demo</MudText>
99
<MudText Typo="Typo.body2">
10-
This sample project was created using the Global InteractiveAuto
10+
This sample project was created using the Global InteractiveWebAssembly
1111
<MudLink Href="https://github.com/MudBlazor/Templates" Target="_blank" Color="Color.Secondary">Template</MudLink>. <br />
1212
When using "Global" Interactivity, the render modes are defined in App.razor and applied to all child components. <br />
1313
<br />
@@ -42,10 +42,10 @@
4242
</MudCardContent>
4343
</MudCard>
4444
<MudCard Elevation="3" Style="max-width:400px;">
45-
<MudCardHeader><MudText Typo="Typo.h6">InteractiveAuto</MudText></MudCardHeader>
45+
<MudCardHeader><MudText Typo="Typo.h6">Render Modes</MudText></MudCardHeader>
4646
<MudCardContent>
4747
<MudText Typo="Typo.body2">
48-
To demonstrate the behavior of InteractiveAuto rendering, this demo includes render mode details in the App Bar. <br />
48+
This demo includes render mode details in the App Bar. <br />
4949
The information updates to reflect how the current page is presently being rendered. <br />
5050
<br />
5151
<strong>SSR</strong> Rendered: Interactive Server-Side Rendering <br />

demo/StaticSample/StaticSample/Components/Account/Pages/Register.razor

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
<MudStaticTextField @bind-Value="@Input.ConfirmPassword" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Outlined.Lock" autocomplete="new-password"
5656
Class="pb-2" Margin="Margin.Dense" Variant="Variant.Outlined" Placeholder="Confirm Password" InputType="InputType.Password" For="() => Input.ConfirmPassword" />
5757

58+
<MudStack Row="true" Justify="Justify.Center">
59+
<MudStaticRadioGroup @bind-Value="Input.UserType" For="() => Input.UserType" Color="Color.Primary">
60+
<MudStaticRadio Value="UserType.Individual" Label="Individual" Class="mb-2" />
61+
<MudStaticRadio Value="UserType.Corporation" Label="Corporation" Class="mb-2" />
62+
</MudStaticRadioGroup>
63+
</MudStack>
64+
5865
<MudStaticButton Class="mt-1 mb-4" FormAction="FormAction.Submit" Color="Color.Primary" Variant="Variant.Filled" FullWidth="true">Register</MudStaticButton>
5966

6067
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.Center" Spacing="2">
@@ -161,5 +168,13 @@
161168
[Display(Name = "Confirm password")]
162169
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
163170
public string ConfirmPassword { get; set; } = "";
171+
172+
public UserType UserType { get; set; } = UserType.Individual;
173+
}
174+
175+
private enum UserType
176+
{
177+
Individual,
178+
Corporation
164179
}
165180
}

demo/StaticSample/StaticSample/Components/App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626

2727
private IComponentRenderMode? RenderModeForPage => HttpContext.Request.Path.StartsWithSegments("/Account")
2828
? null
29-
: InteractiveAuto;
29+
: InteractiveWebAssembly;
3030
}

0 commit comments

Comments
 (0)