You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone! I have the following issue while working with sprinkles API in VE. Let's say I have a Box component to expose sprinkles through props and inject them to the className. And I have a button component with some values defaulted e.g. :
import * as styles from "..."
<Button className={styles.specialBtn}>Special Button</Button>
One would expect the className to override the default fontSize prop, but in fact both fontSize sprinkles are applied and it's anyone's guess which one will come out on top. I understand this is due to the className from the style being extracted as a string prior to the props being injected, and as such both are present in the final className string.
So...I was wondering if anyone has found a good solution to merging sprinkles strings from styles and Box props? It would be nice to have consistent application of styles in this common use case for me.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone! I have the following issue while working with sprinkles API in VE. Let's say I have a Box component to expose sprinkles through props and inject them to the className. And I have a button component with some values defaulted e.g. :
THEN I have a very specific button with some unique styles that can't be covered by sprinkles, so it's nicer to define everything in one style e.g. :
One would expect the className to override the default fontSize prop, but in fact both fontSize sprinkles are applied and it's anyone's guess which one will come out on top. I understand this is due to the className from the style being extracted as a string prior to the props being injected, and as such both are present in the final className string.
So...I was wondering if anyone has found a good solution to merging sprinkles strings from styles and Box props? It would be nice to have consistent application of styles in this common use case for me.
Beta Was this translation helpful? Give feedback.
All reactions