mirror of
https://github.com/byteverse/colonnade.git
synced 2026-02-27 21:48:01 +01:00
add staticTableless
This commit is contained in:
parent
72ea18ba5e
commit
f07bb06e1b
@ -18,6 +18,7 @@ module Reflex.Dom.Colonnade
|
|||||||
-- * Table Encoders
|
-- * Table Encoders
|
||||||
, basic
|
, basic
|
||||||
, static
|
, static
|
||||||
|
, staticTableless
|
||||||
, capped
|
, capped
|
||||||
, cappedResizable
|
, cappedResizable
|
||||||
, cappedResizableTableless
|
, cappedResizableTableless
|
||||||
@ -169,6 +170,21 @@ static tableAttrs mheadAttrs bodyAttrs trAttrs colonnade collection =
|
|||||||
E.headerMonadicGeneral_ colonnade (elFromCell "th")
|
E.headerMonadicGeneral_ colonnade (elFromCell "th")
|
||||||
body bodyAttrs trAttrs colonnade collection
|
body bodyAttrs trAttrs colonnade collection
|
||||||
|
|
||||||
|
staticTableless ::
|
||||||
|
(DomBuilder t m, PostBuild t m, Foldable f, Foldable h, Monoid e)
|
||||||
|
=> Maybe (M.Map T.Text T.Text, M.Map T.Text T.Text)
|
||||||
|
-- ^ Attributes of @\<thead\>@ and its @\<tr\>@, pass 'Nothing' to omit @\<thead\>@
|
||||||
|
-> M.Map T.Text T.Text -- ^ @\<tbody\>@ tag attributes
|
||||||
|
-> (a -> M.Map T.Text T.Text) -- ^ @\<tr\>@ tag attributes
|
||||||
|
-> Colonnade h a (Cell t m e) -- ^ Data encoding strategy
|
||||||
|
-> f a -- ^ Collection of data
|
||||||
|
-> m e
|
||||||
|
staticTableless mheadAttrs bodyAttrs trAttrs colonnade collection = do
|
||||||
|
for_ mheadAttrs $ \(headAttrs,headTrAttrs) ->
|
||||||
|
elAttr "thead" headAttrs . elAttr "tr" headTrAttrs $
|
||||||
|
E.headerMonadicGeneral_ colonnade (elFromCell "th")
|
||||||
|
body bodyAttrs trAttrs colonnade collection
|
||||||
|
|
||||||
-- | A table dividing into sections by @\<td\>@ elements that
|
-- | A table dividing into sections by @\<td\>@ elements that
|
||||||
-- take up entire rows.
|
-- take up entire rows.
|
||||||
sectioned ::
|
sectioned ::
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user