mirror of
https://github.com/rowtype-yoga/ry-blocks.git
synced 2024-09-11 21:38:06 +03:00
Mast ritörn bla bla
This commit is contained in:
parent
d19d606fb8
commit
557f3bbba6
@ -39,12 +39,15 @@ component = mkForwardRefComponent "Drip" \(props :: Props) propsRef -> React.do
|
||||
|
||||
useEffectAlways do
|
||||
nʔ <- React.readRefMaybe ref
|
||||
nʔ # foldMap \n -> do
|
||||
let target = toEventTarget n
|
||||
let et = EventType "animationend"
|
||||
listener <- eventListener (const props.onComplete)
|
||||
addEventListener et listener false target
|
||||
pure $ removeEventListener et listener false target
|
||||
nʔ # case _ of
|
||||
Just n -> do
|
||||
let target = toEventTarget n
|
||||
let et = EventType "animationend"
|
||||
listener <- eventListener (const props.onComplete)
|
||||
addEventListener et listener false target
|
||||
pure $ removeEventListener et listener false target
|
||||
Nothing ->
|
||||
pure (pure unit)
|
||||
|
||||
pure $ guard props.visible do
|
||||
R.div'
|
||||
|
Loading…
Reference in New Issue
Block a user