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 ] ] ]
|
||||
|
||||
-- | 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 id title entry
|
||||
= div_field []
|
||||
|
@ -507,25 +517,43 @@ 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 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.
|
||||
String -> String -> String -> (String -> i) -> String -> String -> HH.HTML w i
|
||||
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.label [ HP.classes C.label, HP.for id ] [ HH.text title ]]
|
||||
, HH.div [ HP.classes C.field_body ]
|
||||
[ HH.p [HP.classes C.control]
|
||||
[ HH.input $
|
||||
[ HE.onValueInput action
|
||||
, HP.value value
|
||||
, HP.placeholder placeholder
|
||||
, HP.classes $ input_classes
|
||||
, HP.id id
|
||||
]
|
||||
[ HH.div [ HP.classes $ C.has_addons <> C.field ]
|
||||
[ HH.p [HP.classes C.control]
|
||||
[ HH.input $
|
||||
[ HE.onValueInput action
|
||||
, HP.value value
|
||||
, HP.placeholder placeholder
|
||||
, HP.classes $ input_classes
|
||||
, HP.id id
|
||||
]
|
||||
]
|
||||
, HH.p [HP.classes C.control]
|
||||
[ HH.a [HP.classes $ C.button <> C.is_small <> C.is_static]
|
||||
[HH.text sidetext] ]
|
||||
]
|
||||
, HH.p [HP.classes C.control]
|
||||
[ HH.a [HP.classes $ C.button <> C.is_small <> C.is_static]
|
||||
[HH.text sidetext] ]
|
||||
]
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue