Expose subscriptions rather than particleSystem

This commit is contained in:
Tessa Kelly 2020-05-15 10:22:24 -07:00
parent 7bcb96e186
commit 64f415564c
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ module Nri.Ui.Confetti.V1 exposing
, Msg, burst, update, updateCenter
, view
, Confetti
, particleSystem
, subscriptions
)
{-|
@ -12,7 +12,7 @@ module Nri.Ui.Confetti.V1 exposing
@docs Msg, burst, update, updateCenter
@docs view
@docs Confetti
@docs particleSystem
@docs subscriptions
-}
@ -252,6 +252,6 @@ updateCenter center (System system _) =
{-| -}
particleSystem : System -> ParticleSystem.System Confetti
particleSystem (System system _) =
system
subscriptions : (Msg -> msg) -> System -> Sub msg
subscriptions confettiMsg (System system _) =
ParticleSystem.sub [] confettiMsg system

View File

@ -23,7 +23,7 @@ example =
, categories = [ Animations ]
, state = init
, update = update
, subscriptions = \_ -> Sub.none
, subscriptions = \state -> Confetti.subscriptions ConfettiMsg state.confettiState
, view =
\state ->
[ Button.button "Launch confetti!"