git ssb

0+

VictorBjelkholm (lasoa) / re-harel



Commit 3704089247b0a556e07a8244b11c043a48ef19be

Add transitions because why not

License: MIT
Signed-off-by: Victor Bjelkholm <git@victor.earth>
victorbjelkholm committed on 5/9/2020, 11:19:54 AM
Parent: 7c7b405409c95869f77c036cea58ebbd301b3803

Files changed

statechart-examples/src/statechart_examples/examples/toggle.cljschanged
statechart-examples/src/statechart_examples/examples/toggle.cljsView
@@ -19,13 +19,17 @@
1919 {:style {:height 40
2020 :width 80
2121 :border "2px solid grey"
2222 :display "flex"
23- :justify-content (ifstate machine :inactive "flex-start" "flex-end")
24- :background-color (ifstate machine :inactive "lightgrey" "lightblue")
23 + :justify-content "flex-start"
24 + :background-color (ifstate machine :active "lightblue" "lightgrey")
2525 :align-items "center"
2626 :border-radius 30}}
2727 [:div
28- {:style {:background-color (ifstate machine :inactive "black" "blue")
28 + {:style {:background-color (ifstate machine :active "blue" "black")
29 + :transform (ifstate machine :active "translateX(100%)" "translateX(0%)")
30 + :transition "transform 350ms"
31 + :transition-timing-function "cubic-bezier(0.85, 0, 0.15, 1)"
32 + ;; :transition-timing-function "ease-in-out"
2933 :height 40
3034 :width 40
3135 :border-radius 40}}]]]])

Built with git-ssb-web