diff options
author | Joris | 2019-10-22 22:26:38 +0200 |
---|---|---|
committer | Joris | 2019-10-22 22:26:38 +0200 |
commit | 613ffccac4b3ab25c6d4c631fab757da0b35acf6 (patch) | |
tree | 13e448af89f4079bb62d7ce8b5a44b6a64515129 /client/src/Component/Modal.hs | |
parent | 80f09e8b3a5c856e60922a73c9161a8c5392e4d4 (diff) |
Harmonize view component code style
Diffstat (limited to 'client/src/Component/Modal.hs')
-rw-r--r-- | client/src/Component/Modal.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/client/src/Component/Modal.hs b/client/src/Component/Modal.hs index 96c2679..50af469 100644 --- a/client/src/Component/Modal.hs +++ b/client/src/Component/Modal.hs @@ -1,5 +1,5 @@ module Component.Modal - ( Input(..) + ( In(..) , Content , view ) where @@ -22,15 +22,15 @@ import qualified Util.Reflex as ReflexUtil -- Content = CurtainClickEvent -> (CancelEvent, ConfirmEvent) type Content t m a = Event t () -> m (Event t (), Event t a) -data Input t m a = Input - { _input_show :: Event t () - , _input_content :: Content t m a +data In t m a = In + { _in_show :: Event t () + , _in_content :: Content t m a } -view :: forall t m a. MonadWidget t m => Input t m a -> m (Event t a) +view :: forall t m a. MonadWidget t m => In t m a -> m (Event t a) view input = do rec - let show = Show <$ (_input_show input) + let show = Show <$ (_in_show input) startHiding = R.attachWithMaybe @@ -61,7 +61,7 @@ view input = do (do (curtain, _) <- R.elAttr' "div" (M.singleton "class" "g-Modal__Curtain") $ R.blank let curtainClick = R.domEvent R.Click curtain - (hide, content) <- R.divClass "g-Modal__Content" (_input_content input curtainClick) + (hide, content) <- R.divClass "g-Modal__Content" (_in_content input curtainClick) return (curtainClick, hide, content)) |