reflex-dom-core-0.5: Functional Reactive Web Apps with Reflex

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Widget.Resize

Synopsis

Documentation

resizeDetector :: (MonadJSM m, DomBuilder t m, PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, DomBuilderSpace m ~ GhcjsDomSpace, MonadJSM (Performable m), MonadFix m) => m a -> m (Event t (), a) Source #

A widget that wraps the given widget in a div and fires an event when resized. Adapted from github.com/marcj/css-element-queries

resizeDetectorWithStyle Source #

Arguments

:: (MonadJSM m, DomBuilder t m, PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, DomBuilderSpace m ~ GhcjsDomSpace, MonadJSM (Performable m), MonadFix m) 
=> Text

A css style string. Warning: It should not contain the "position" style attribute.

-> m a

The embedded widget

-> m (Event t (), a)

An Event that fires on resize, and the result of the embedded widget

resizeDetectorWithAttrs Source #

Arguments

:: (MonadJSM m, DomBuilder t m, PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, DomBuilderSpace m ~ GhcjsDomSpace, MonadJSM (Performable m), MonadFix m) 
=> Map Text Text

A map of attributes. Warning: It should not modify the "position" style attribute.

-> m a

The embedded widget

-> m (Event t (), a)

An Event that fires on resize, and the result of the embedded widget