Fork me on GitHub
#hoplon
<
2015-10-06
>
mynomoto11:10:10

@levitanong: the version passing a string always append. You can do :class (cell= {:some-constant-class-name true :work work? :play ?play})

mynomoto11:10:44

In this case if ?work is thruty the element will have the class work, and if it's false it won't. This will work. Or better yet: :class (cell= {:some-constant-class-name true :work work? :play (not ?work)})

levitanong12:10:05

Hmm. That doesn’t seem to scale to, say, 100 possible states. Then again, at that point, one could use (merge)

mynomoto13:10:23

@levitanong: 100 possible states are too many states 😉 You can also create a do! method that deals with class in any way you want.

levitanong13:10:43

@mynomoto: Well, that’s a good point. 😛

micha16:10:56

@jab: thanks for making that simple_smile

Josh17:10:53

@micha: my pleasure and glad if it's useful!