milandekruijf / pandacss-preset-radix-colors

Radix Colors preset for PandaCSS
https://milandekruijf.com/work/pandacss-preset-radix-colors
MIT License
27 stars 2 forks source link

Select color sets #1

Closed gavinbaradic closed 10 months ago

gavinbaradic commented 11 months ago

Would be nice if you could pass in an array of color sets you'd like to include in the preset to slim down the amount of css variables. sort of like:

radixColorsPreset({
  colorSets: ['gray', 'ruby', 'green'],
})

i might be able to help contribute this feature, if interested

milandekruijf commented 11 months ago

Hello!

I've been thinking about implementing that feature but there was no ask yet. I was hoping PandaCSS would get smart enough to see if tokens are used or not, as it can detect a lot of other things. But that is apparently not happening.

I wouldn't mind working on it. I'll probably have to do the typings manually though, I am not that advanced at TypeScript. If you think you can be of any help, let me know.

milandekruijf commented 10 months ago

Version 0.2.0 has been published with the changes. I've done some testing myself and couldn't find any bugs. Thanks again.