Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HidingStrategy
- data ModalConfig = ModalConfig {}
- modal :: MonadWidget t m => ModalConfig -> Event t Bool -> m (Event t a, Event t ()) -> m (Event t a)
- mkModalBody :: MonadWidget t m => m (Event t ()) -> (Dynamic t (Either e a) -> m (Event t (), Event t ())) -> m (Dynamic t (Either e a)) -> m (Event t (Either e a), Event t ())
Documentation
data HidingStrategy Source
When the hiding strategy is RemoveFromDOM, the widget adds and removes
the modal markup from the DOM when the modal is opened and closed. For
DisplayNone
and VisibilityInvisible
the modal markup is always kept in
the DOM and visibility is controlled by setting the style to display:none
or visibility:invisible
respectively. DisplayNone
causes the elements
to be completely taken out of the document flow. This means that widgets
in the modal will only be able to get things like height when the modal is
visible. Using VisibilityInvisible
gets around this limitation.
data ModalConfig Source
ModalConfig | |
|
:: MonadWidget t m | |
=> ModalConfig | |
-> Event t Bool | Event to open and/or close the model |
-> m (Event t a, Event t ()) | Widget rendering the body of the modal. Returns an event with a success value and an event triggering the close of the modal. |
-> m (Event t a) |
:: MonadWidget t m | |
=> m (Event t ()) | A header widget returning an event that closes the modal. |
-> (Dynamic t (Either e a) -> m (Event t (), Event t ())) | Footer widget that takes the current state of the body and returns a pair of a cancel event and an ok event. |
-> m (Dynamic t (Either e a)) | |
-> m (Event t (Either e a), Event t ()) |
Template for a modal with a header, body, and footer where the header has a close icon and the footer has a cancel and save button.