Razor.SweetAlert2 icon indicating copy to clipboard operation
Razor.SweetAlert2 copied to clipboard

Bug Color - Razor/Blazor

Open lopesclayton opened this issue 2 years ago • 3 comments
trafficstars

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

lopesclayton avatar Dec 13 '22 03:12 lopesclayton

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?

Basaingeal avatar Dec 13 '22 15:12 Basaingeal

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

lopesclayton avatar Dec 13 '22 23:12 lopesclayton

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?

lopesclayton avatar Dec 14 '22 00:12 lopesclayton