Are boolean variants supported? #79
-
Are boolean variants currently supported? i.e. disabled, fullWidth, partyMode, etc. I have a feeling this is a bigger conversation around how non-string based props can influence variants. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
You can find an example here (Dynamic Text Content) |
Beta Was this translation helpful? Give feedback.
-
Updated since docs moved - Using string as a boolean isn't the same, but close enough: |
Beta Was this translation helpful? Give feedback.
-
No, it's not close enough. When evaluation a prop as a boolean, that's not a string, i.e. dayjs(date).isToday return true of false. It would be great when cva could accept this, and return the true or false variant... Please re-open this request. Thnx. |
Beta Was this translation helpful? Give feedback.
-
Closing this as it will be resolved by #176 |
Beta Was this translation helpful? Give feedback.
Updated since docs moved - Using string as a boolean isn't the same, but close enough:
https://cva.style/docs/examples/other-use-cases