goober
goober copied to clipboard
feat: add clsx utility as a subpackage
NOTE: These changes are quite similar to #236, but I've gone ahead and made a new PR based off of the latest changes on
master
.
Well, here we are again! I found some time to work on this clsx
utility to let us combine & override classes. The current implementation is very similar to what I had in #236, but there are a few important notes here:
- Since I had separated
clsx
into its own subpackage, it now depends ongoober
exposing certain core utilities. - With my current changes,
goober
now exposes an objectcore
which contains the necessary functions forclsx
to work. - I've tried to keep the API change minimal so as not to confuse users. I think having a
core
export may be easier for a user to ignore than several functions, so that's why I've grouped the core utilities this way.
The test suite is actually the same one that I'd written in #236 and passes without any issue (yay)! In addition, I went and added information to the docs
so folks can see instructions on the documentation site.
One thing to note is that I have not tested this change in a real application yet. My work here was purely porting the code from #236 in order to target master
again. @cristianbote, might want to give 'er a try before we consider merging this.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/cristianbote/goober-rocks/4iPkVTDDkaqGTrp6LH8n4z93o2we
✅ Preview: https://goober-rocks-git-fork-jakehamilton-feat-cls-8f19be-cristianbote.vercel.app
It looks like the filesize
check is failing, but I'm not sure why or how to fix that. Might need some help there 😅
This PR has sat around for a while so I'll be closing it. If anyone wants to pick this feature up, please feel free to use the code here!