Bulma: better documentation and fix some CSS.
parent
d876531d23
commit
1cc6d57728
|
@ -319,6 +319,16 @@ div_field_content content
|
||||||
[ HH.div [HP.classes C.field ] [ HH.div [HP.classes C.control ] [ content ] ] ]
|
[ HH.div [HP.classes C.field ] [ HH.div [HP.classes C.control ] [ content ] ] ]
|
||||||
|
|
||||||
-- | Basic field entry with a title and a field content.
|
-- | Basic field entry with a title and a field content.
|
||||||
|
-- |
|
||||||
|
-- |```
|
||||||
|
-- |div [field is-horizontal]
|
||||||
|
-- | div [field-label is-normal]
|
||||||
|
-- | label [for-id]
|
||||||
|
-- | text
|
||||||
|
-- | div [field-body]
|
||||||
|
-- | div [field]
|
||||||
|
-- | div [control]
|
||||||
|
-- |```
|
||||||
field_entry :: forall w i. String -> String -> HH.HTML w i -> HH.HTML w i
|
field_entry :: forall w i. String -> String -> HH.HTML w i -> HH.HTML w i
|
||||||
field_entry id title entry
|
field_entry id title entry
|
||||||
= div_field []
|
= div_field []
|
||||||
|
@ -507,13 +517,30 @@ article head body = article_ [] head body
|
||||||
error_message :: forall w i. HH.HTML w i -> HH.HTML w i -> HH.HTML w i
|
error_message :: forall w i. HH.HTML w i -> HH.HTML w i -> HH.HTML w i
|
||||||
error_message head body = article_ C.is_danger head body
|
error_message head body = article_ C.is_danger head body
|
||||||
|
|
||||||
|
|
||||||
|
-- | Basic input field with a read-only side text.
|
||||||
|
-- |
|
||||||
|
-- |```
|
||||||
|
-- |div [field is-horizontal]
|
||||||
|
-- | div [field-label normal]
|
||||||
|
-- | label [label for-id]
|
||||||
|
-- | text
|
||||||
|
-- | div [field-body]
|
||||||
|
-- | div [has-addons field]
|
||||||
|
-- | p [control]
|
||||||
|
-- | input
|
||||||
|
-- | p [control]
|
||||||
|
-- | a [button is-small is-static]
|
||||||
|
-- | text
|
||||||
|
-- |```
|
||||||
input_with_side_text :: forall w i.
|
input_with_side_text :: forall w i.
|
||||||
String -> String -> String -> (String -> i) -> String -> String -> HH.HTML w i
|
String -> String -> String -> (String -> i) -> String -> String -> HH.HTML w i
|
||||||
input_with_side_text id title placeholder action value sidetext
|
input_with_side_text id title placeholder action value sidetext
|
||||||
= HH.div [HP.classes $ C.has_addons <> C.field <> C.is_horizontal]
|
= HH.div [HP.classes $ C.field <> C.is_horizontal]
|
||||||
[ HH.div [ HP.classes (C.field_label <> C.normal) ]
|
[ HH.div [ HP.classes (C.field_label <> C.normal) ]
|
||||||
[HH.label [ HP.classes C.label, HP.for id ] [ HH.text title ]]
|
[HH.label [ HP.classes C.label, HP.for id ] [ HH.text title ]]
|
||||||
, HH.div [ HP.classes C.field_body ]
|
, HH.div [ HP.classes C.field_body ]
|
||||||
|
[ HH.div [ HP.classes $ C.has_addons <> C.field ]
|
||||||
[ HH.p [HP.classes C.control]
|
[ HH.p [HP.classes C.control]
|
||||||
[ HH.input $
|
[ HH.input $
|
||||||
[ HE.onValueInput action
|
[ HE.onValueInput action
|
||||||
|
@ -528,6 +555,7 @@ input_with_side_text id title placeholder action value sidetext
|
||||||
[HH.text sidetext] ]
|
[HH.text sidetext] ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
]
|
||||||
|
|
||||||
-- | `modal`: create a modal by providing a few things:
|
-- | `modal`: create a modal by providing a few things:
|
||||||
-- | - a title (a simple String)
|
-- | - a title (a simple String)
|
||||||
|
|
Loading…
Reference in New Issue