Replies: 1 comment
-
hey, the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently using panda css to write my own components library.
It's the best option for css-in-js I've seen so far.
One of the things I've done is split my library into two parts.
One package containing SystemStyleObject definitions like this for the css (in typescript)
And a second package containg vue controls.
The general idea is that I can create seperate packages for things like react or other frameworks using the same css later on.
The current
cx
function only takes strings however and I can't use thecss
function within the css packageas both the
css
andcx
function are locally scoped within the vue package inside thestyled-system
directoryThis means I'd end up wrapping everything that's pulled from my css package with a css function.
As a workaround I implemented my own short implementation of the cx function
The only difference is that it checks to see if the input is an object, then wraps it in a css() function call if so.
I just thought to ask would this be a good idea for the cx function generated by panda css?
It's only possible to check the type of the object within typescript though (can only check at build time but not runtime)
Beta Was this translation helpful? Give feedback.
All reactions