On Tuesday, August 11, 2015 at 4:29:25 AM UTC+10, Roger Gilliar wrote:
> I'm trying to use a CSSTransitionGroup with a reagent component that looks
> like this:
>
> (defmethod render-page :code-example [{:keys [title origin content lang
> explanation output]}]
> (let [content-indexed (map-indexed (fn [idx c] [idx c]) (vectorize
> content))]
> [css-transition-group {:transition-name "example"}
> [:div.content-frame.blue-tstar.header-text
> [:div {:style {:margin-bottom "0.3em"}} title]
> [:span
> (for [item content-indexed]
> ^{:key (first item)}
> [:pre.code.code-example {"data-language" (get-lang lang (first
> item))}
> (h/normalize (second item))])]
> (build-explanation explanation)
> (build-origin origin)]]))
>
> The css is this:
>
> .example-enter {
> opacity: 0.01;
> }
>
> .example-enter-active {
> opacity: 1;
> transition: opacity .5s ease-in;
> }
>
>
> I tried to follow the reagent cookbook but even the demo there doesn't work
> as expected (only animation on delete) and with my code I can't see any
> animation at all.
I've not done it. So I can only point you in this direction:
http://www.mattgreer.org/articles/a-game-made-with-reagent/
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.