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

Is It Possible To add a variable CSS Color as Color? #572

Open
ljs19923 opened this issue Sep 9, 2023 · 1 comment
Open

Is It Possible To add a variable CSS Color as Color? #572

ljs19923 opened this issue Sep 9, 2023 · 1 comment

Comments

@ljs19923
Copy link

ljs19923 commented Sep 9, 2023

Hi, I would like to know if it's possible to do this? and if not, how

<BarLoader width={"70%"} height={2} color={"var(--textColor)"} />

I would like to be able to change the color of my loaders from a Css var. If for example I have a dark/white theme, controlled by a css variable, I would like to be able to edit my bar loader directly when the css variable change.

This code works a little bit but the background behind the bar loader disappear :/ the color bar change well

Result:

Screen Shot 2023-09-09 at 14 21 34

What I would like to have:

Screen Shot 2023-09-09 at 14 21 23

Thanks a lot

@ljs19923 ljs19923 changed the title Is It Possible To variable CSS Color as Color? Is It Possible To add a variable CSS Color as Color? Sep 9, 2023
@davidhu2000
Copy link
Owner

davidhu2000 commented Sep 15, 2023

backgroundColor: color,

i'm not sure, I will need to see if this is possible. Currently it is just passed as a string

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