mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-20 04:01:40 +03:00
Expose subscriptions rather than particleSystem
This commit is contained in:
parent
7bcb96e186
commit
64f415564c
@ -3,7 +3,7 @@ module Nri.Ui.Confetti.V1 exposing
|
|||||||
, Msg, burst, update, updateCenter
|
, Msg, burst, update, updateCenter
|
||||||
, view
|
, view
|
||||||
, Confetti
|
, Confetti
|
||||||
, particleSystem
|
, subscriptions
|
||||||
)
|
)
|
||||||
|
|
||||||
{-|
|
{-|
|
||||||
@ -12,7 +12,7 @@ module Nri.Ui.Confetti.V1 exposing
|
|||||||
@docs Msg, burst, update, updateCenter
|
@docs Msg, burst, update, updateCenter
|
||||||
@docs view
|
@docs view
|
||||||
@docs Confetti
|
@docs Confetti
|
||||||
@docs particleSystem
|
@docs subscriptions
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
@ -252,6 +252,6 @@ updateCenter center (System system _) =
|
|||||||
|
|
||||||
|
|
||||||
{-| -}
|
{-| -}
|
||||||
particleSystem : System -> ParticleSystem.System Confetti
|
subscriptions : (Msg -> msg) -> System -> Sub msg
|
||||||
particleSystem (System system _) =
|
subscriptions confettiMsg (System system _) =
|
||||||
system
|
ParticleSystem.sub [] confettiMsg system
|
||||||
|
@ -23,7 +23,7 @@ example =
|
|||||||
, categories = [ Animations ]
|
, categories = [ Animations ]
|
||||||
, state = init
|
, state = init
|
||||||
, update = update
|
, update = update
|
||||||
, subscriptions = \_ -> Sub.none
|
, subscriptions = \state -> Confetti.subscriptions ConfettiMsg state.confettiState
|
||||||
, view =
|
, view =
|
||||||
\state ->
|
\state ->
|
||||||
[ Button.button "Launch confetti!"
|
[ Button.button "Launch confetti!"
|
||||||
|
Loading…
Reference in New Issue
Block a user