krisajenkins / purescript-halogen-transition

A component that toggles enter/leave class when visibility changes

Home Page:https://nonbili.github.io/purescript-halogen-transition/#Simple

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

purescript-halogen-transition

CircleCI

Works with Halogen 5 rc.4.

See a demo.

How to use

Please check examples folder. The basic idea is passing a render function to Transition.component.

import Halogen.Transition as Transition

render state =
    HH.slot _transition unit Transition.component
    { enterClass: "simple-enter"
    , enterActiveClass: "simple-enter-active"
    , leaveClass: "simple-leave"
    , leaveActiveClass: "simple-leave-active"
    , shown: state.shown
    , render: HH.text "hello world!"
    } $ const Nothing

About

A component that toggles enter/leave class when visibility changes

https://nonbili.github.io/purescript-halogen-transition/#Simple

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PureScript 100.0%