Skip to content

Instantly share code, notes, and snippets.

@mankyKitty
Created April 9, 2018 01:31
Show Gist options
  • Save mankyKitty/419440589b02cb0f03a5f927affd2bb5 to your computer and use it in GitHub Desktop.
Save mankyKitty/419440589b02cb0f03a5f927affd2bb5 to your computer and use it in GitHub Desktop.
elAttrStylez
:: MonadWidget t m
=> Text
-> m a
-> Map Text Text
-> m a
elAttrStylez e =
flip (RD.elAttr e)
clayDiv
:: MonadWidget t m
=> m ()
clayDiv =
elAttrStylez "div" (RD.text "blank") $ "style" =: inlineCss (
do
C.background C.black
C.color C.red
)
inlineCss :: Css -> Text
inlineCss = TL.toStrict . C.renderWith C.htmlInline mempty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment