mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-24 06:02:36 +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
|
||||
, 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
|
||||
|
@ -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!"
|
||||
|
Loading…
Reference in New Issue
Block a user