Sprinkles and Pseudo Classes #1224
Closed
Filippinifra
started this conversation in
General
Replies: 1 comment 6 replies
-
You can use selectors with sprinkles by defining a // sprinkles.css.ts
const colors = ["base-200", "disabled-200"];
const colorProperties = defineProperties({
conditions: {
default: {},
disabled: { selector: "&:disabled" },
},
defaultCondition: "default",
properties: {
backgroundColor: colors,
},
});
// App.tsx
<div className={sprinkles({ backgroundColor: { default: "base-200", disabled: "disabled-100" } )} /> |
Beta Was this translation helpful? Give feedback.
6 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I honestly like sprinkles and we are using it in our company but there is a problem I'm facing up:
how can I use the possible values defined in sprinkles under a pseudo class?
for example:
I defined in my sprinkle file
when I use it in sprinkle it is correctly working like that
but if I try to use it under a disabled pseudo class it throw me an error:
I have the same problem for "selectors" object.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions