0

I'm building a React project with TypeScript that will be sold to multiple clients. To accommodate dynamic theming, all configuration—including theme colors, assets and texts—is fetched from an API endpoint and stored in JSON objects.

Since PrimeReact components derive their styling from CSS/SASS, I understand that I can override the existing theme by modifying these files. However, of course I can’t directly assign values from JSON objects or import JSON files into CSS/SASS.

Has anyone implemented a solution where theme colors are dynamically injected into PrimeReact’s styling? What approaches or tools do you recommend to bridge the gap between dynamic JSON configurations and static CSS/SASS files?

Any insights would be highly appreciated.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.