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.