Is there a better way to do conditional classes? #841
gavinhewitt
started this conversation in
4. General
Replies: 2 comments 3 replies
-
@gavinhewitt A ternary does work, you need to remove the curly braces from the expression though, otherwise it's like a weird object syntax.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah thanks @ryangjchandler !! Did not think of removing the braces :-( |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry if this has been asked before but could not find anything about this.
Currently, it seems, the only way do bind conditional classes is like so
while it would be much nicer to have something like
Or did I miss some docs?
Beta Was this translation helpful? Give feedback.
All reactions