Dynamically Injecting Color Palette #348
Unanswered
scruz-dev-blossom
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I'm looking for a way to dynamically inject additional color configurations. Specifically, I need to incorporate a color palette received as JSON from my backend after the library's initial setup.
Essentially, I receive a JSON payload containing color definitions, and I want to extend the color palette with these values on the fly. Is there a direct method or a recommended approach to achieve this?
This is the backend data
I've already attempted using a JavaScript Proxy to intercept and modify the configuration object, but I'm wondering if there's a cleaner, more supported way to handle this. Any insights or suggestions would be greatly appreciated!
And then call
addTwColor
when i got the backend response and use thetw
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions