styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.28k stars 105 forks source link

Is there an easier way to adding new utilities? #415

Open STiXzoOR opened 10 months ago

STiXzoOR commented 10 months ago

Currently to add new utilities we have to define them in a file called xstyled.config.ts and then export the relevant factories to get the new utilities. But what if our codebase is huge and we have to replace all instances of @xstyled/.... to the new exported ones?

I feel like there should be a logic where the @xstyled/system either reads the xstyled.config.ts and extends the utilities accordingly or expose a function like we do with the theme, eg extendSystem, and have those utilities without exporting the custom ones.

My question is, does anyone got in that situation? If yes what was the best solution without too much overhead?