module Application.Helper.View where import IHP.ViewPrelude import Generated.Types import Web.Types -- | Widget Envelope — wraps any widget's rendered content with IHF governance metadata. -- -- Every interactive element that is part of the governed widget registry should -- be wrapped with this helper. It injects the stable data-* attributes that the -- client-side event capture script reads to identify the widget without coupling -- to implementation details. -- -- Usage: -- -- @ -- widgetEnvelope widget [hsx| -- -- |] -- @ -- -- See docs/widget-envelope-convention.md for the full convention. widgetEnvelope :: Widget -> Html -> Html widgetEnvelope widget inner = [hsx|
|]