Files
radzen-blazor/RadzenBlazorDemos/Pages/NotificationCustomContent.razor
Vladimir Enchev 3092e88626 Demos: use semantically correct heading levels in examples
Add explicit TagName to RadzenText usages that rendered real heading
elements (H1-H6, DisplayH1-H6, Subtitle1/2) purely for visual styling,
and convert raw HTML headings in examples to RadzenText with proper
TextStyle and TagName. Visual labels now render as <p>, genuine
headings use correct levels without skips (WCAG 1.3.1).

Fixes #2596
2026-07-03 10:19:56 +03:00

20 lines
737 B
Plaintext

@inject NotificationService NotificationService
<div class="rz-p-12 rz-text-align-center">
<RadzenButton Text="Show notification with custom content"
Click="@(args => ShowNotificationWithCustomContent())" />
</div>
@code {
void ShowNotificationWithCustomContent()
{
NotificationService.Notify(new NotificationMessage
{
Severity = NotificationSeverity.Warning,
Duration = 40000,
SummaryContent = ns =>@<RadzenText TextStyle="TextStyle.H6" TagName="TagName.P">Custom summary: <br /> @DateTime.Now</RadzenText>,
DetailContent = ns => @<RadzenButton Text="Clear" Click="@(args => ns.Messages.Clear())" />
});
}
}