mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
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
20 lines
737 B
Plaintext
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())" />
|
|
});
|
|
}
|
|
}
|