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

Bug Color - Razor/Blazor #2217

Open
lopesclayton opened this issue Dec 13, 2022 · 3 comments
Open

Bug Color - Razor/Blazor #2217

lopesclayton opened this issue Dec 13, 2022 · 3 comments

Comments

@lopesclayton
Copy link

lopesclayton commented Dec 13, 2022

SweetAlertResult result = await _swal.FireAsync(new SweetAlertOptions
{
TitleText= title,
Text = message,
Color = "Black",
Background = "#FBF9F9",
Icon = SweetAlertIcon.Warning,
IconColor = "Red",
ButtonsStyling = true,
ShowCancelButton = false,
ConfirmButtonColor = "Black",
ConfirmButtonText = textButtonOK,
HeightAuto = false
}); ; ;

		return result;

https://prnt.sc/yhIyEWOx1rwW

not respect color Color = "Black", to text

@Basaingeal
Copy link
Owner

Basaingeal commented Dec 13, 2022

I'm not currently able to reproduce this issue. Color is tracking fine in my tests.

SweetAlertResult result = await Swal.FireAsync(new SweetAlertOptions
        {
            TitleText= "Error",
            Text = "Login Failed",
            Color = "Red",
            Background = "#FBF9F9",
            Icon = SweetAlertIcon.Warning,
            IconColor = "Red",
            ButtonsStyling = true,
            ShowCancelButton = false,
            ConfirmButtonColor = "Black",
            ConfirmButtonText = "textButtonOK",
            HeightAuto = false
        });

image

Are you using one of the provided themes?

@lopesclayton
Copy link
Author

builder.Services.AddSweetAlert2(options =>
{
options.SetThemeForColorSchemePreference(ColorScheme.Dark, SweetAlertTheme.Default);
});

@lopesclayton
Copy link
Author

I think I get it, it's getting the color from the bootstrap css,

that is, what is in the global css replaces the color that I set for the object..

how to ignore it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants