Modal and Confirm Dialog HeaderCssClass/Dialog Doesnt Work #802
-
This is my code and it should change the color but it doesnt, please help im using v. 3.0.0. preview.2
heres the css |
Beta Was this translation helpful? Give feedback.
Answered by
gvreddy04
Jul 15, 2024
Replies: 1 comment
-
@mightygriffon6 Thank you for trying BlazorBootstrap. Here's an example below: <Modal @ref="modal" Title="Modal title" HeaderCssClass="custom-modal-header">
<BodyTemplate>
Modal body text goes here.
</BodyTemplate>
<FooterTemplate>
<Button Color="ButtonColor.Secondary" @onclick="OnHideModalClick">Close</Button>
<Button Color="ButtonColor.Primary">Save changes</Button>
</FooterTemplate>
</Modal>
<Button Color="ButtonColor.Primary" @onclick="OnShowModalClick">Show Modal</Button>
@code {
private Modal modal = default!;
private async Task OnShowModalClick()
{
await modal.ShowAsync();
}
private async Task OnHideModalClick()
{
await modal.HideAsync();
}
}
<style>
.custom-modal-header {
background-color: rgb(0,108,125) !important;
color: white !important;
}
</style> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mightygriffon6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mightygriffon6 Thank you for trying BlazorBootstrap. Here's an example below: