Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing base component inheritance to BitMessageBox (#9666) #9667

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@namespace Bit.BlazorUI
@inherits BitComponentBase

<div style="@Styles?.Root" class="bit-msb @Classes?.Root">
<div @ref="RootElement"
@attributes="HtmlAttributes"
id="@_Id"
style="@StyleBuilder.Value"
class="@ClassBuilder.Value"
dir="@Dir?.ToString().ToLower()">
<div style="@Styles?.Container" class="bit-msb-con @Classes?.Container">
<div style="@Styles?.Header" class="bit-msb-hdr @Classes?.Header">
<BitText Typography="BitTypography.H5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Bit.BlazorUI;
/// <summary>
/// BitMessageBox is a pre-implemented box for showing messages with title and body.
/// </summary>
public partial class BitMessageBox
public partial class BitMessageBox : BitComponentBase
{
/// <summary>
/// The body of the message box.
Expand Down Expand Up @@ -39,6 +39,20 @@ public partial class BitMessageBox



protected override string RootElementClass => "bit-msb";

protected override void RegisterCssClasses()
{
ClassBuilder.Register(() => Classes?.Root);
}

protected override void RegisterCssStyles()
{
StyleBuilder.Register(() => Styles?.Root);
}



private async Task CloseModal()
{
await OnClose.InvokeAsync();
Expand Down
Loading